import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while(scanner.hasNext()) { String s1 = scanner.nextLine(); String s2 = scanner.nextLine(); int index = s1.indexOf(s2); if(index != -1) { index++; } System.out.println(index); } } } |
Double click to view unformatted code.