fork download
  1. //Complete this code or write your own from scratch
  2. import java.util.*;
  3. import java.io.*;
  4.  
  5. class Solution {
  6. public static void main(String []argh) {
  7. Scanner in = new Scanner(System.in);
  8. int n = in.nextInt();
  9. in.nextLine();
  10. String[] name = new String[n];
  11. int [] phone = new int[n];
  12. for (int i = 0; i < n; i++) {
  13. System.out.println(i + "<- ");
  14. name[i] = in.nextLine();
  15. phone[i] = in.nextInt();
  16. in.nextLine();
  17. }
  18.  
  19. while (in.hasNext()) { // incepe while
  20. String queries = in.nextLine();
  21. //System.out.println(queries + "<- ");
  22.  
  23.  
  24. }
  25. }
  26. }
  27.  
  28.  
  29.  
  30.  
Success #stdin #stdout 0.21s 56872KB
stdin
3
uncle sam
99912222
tom
11122222
harry
12299933
uncle sam
uncle tom
harry
stdout
0<- 
1<- 
2<-