Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Main {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int n;
- int[] a = new int[5];
- while (true) {
- n = scan.nextInt();
- if (n == 0) {
- break;
- }
- for (int i = 0; i < n; i++) {
- int ss = -1;
- for (int j = 0; j < 5; j++) {
- a[j] = scan.nextInt();
- if (a[j] <= 127) {
- if (ss == -1) {
- ss = j;
- } else {
- ss = 123;
- }
- }
- }
- if (ss > -1 && ss < 5) {
- System.out.println((char) (ss + 65));
- } else {
- System.out.println('*');
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement