QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#378118 | #7697. Impartial Strings | mbender | Compile Error | / | / | Java8 | 511b | 2024-04-06 04:40:09 | 2024-04-06 04:40:10 |
Judging History
answer
import java.util.Scanner;
public class impartialstrings {
public static void main(String[] args){
Scanner scanner = new Scanner();
String line = scanner.getLine();
int K = Integer.parseInt(k);
while(K-- > 0){
line = scanner.getLine();
String[] arr = line.split(" ");
String A = arr[0];
String S = arr[1];
String T = arr[2];
System.out.println((S.equals(T)) || (A.length() <= 2 && S.charAt(0)!=S.charAt(1) && T.charAt(0)!= T.charAt(1))) ? 1:0);
}
}
}
Details
impartialstrings.java:18: error: not a statement System.out.println((S.equals(T)) || (A.length() <= 2 && S.charAt(0)!=S.charAt(1) && T.charAt(0)!= T.charAt(1))) ? 1:0); ^ impartialstrings.java:18: error: ';' expected System.out.println((S.equals(T)) || (A.length() <= 2 && S.charAt(0)!=S.charAt(1) && T.charAt(0)!= T.charAt(1))) ? 1:0); ^ 2 errors