public class Main {     public static void main(String[] args){         ArrayList<String> res = new ArrayList<>();         ArrayList<Integer> list = new ArrayList<>();         boolean flag = false;         Scanner sc = new Scanner(System.in);         while(sc.hasNextLine()){             String str = sc.nextLine();             res.add(str);             if(str.equals("END")) break;             String[] s = str.split("#");             int n = Integer.parseInt(s[0]);             int m = Integer.parseInt(s[1], n);             list.add(m);         }         for(int i = 0; i < list.size(); i++){             int m = list.get(i);             if(list.lastIndexOf(m) == list.indexOf(m)){                 System.out.println(res.get(i));                 flag = true;             }         }         if(!flag) System.out.println("None");     } }
点赞 评论

相关推荐

饿魔:看到在线简历了吧
点赞 评论 收藏
分享
孙艹肘:校招不给三方直接让实习我都去了,,主打一个在学校呆着也是闲着,不如出来实习一下
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务