import java.util.Scanner;
//import java.util.TreeMap;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String[] arr = new String[n];
for (int i = 0; i < n; i++) {
arr[i] = sc.next();
}
for (int i = 0; i < arr.length; i++) {
if (arr[i].charAt(0) + arr[i].charAt(1) + arr[i].charAt(2) == arr[i].charAt(3) + arr[i].charAt(4)
+ arr[i].charAt(5)) {
System.out.println("You are lucky!");
} else {
System.out.println("Wish you good luck.");
}
}
}
}
PAT 幸运彩票 Java
于 2020-08-15 15:32:09 首次发布