fork(4) download
  1. import java.lang.Math;
  2. import java.io.InputStreamReader;
  3. import java.io.BufferedReader;
  4. import java.util.StringTokenizer;
  5.  
  6. class submission{
  7. public static void piano(int[] notes, int n) {
  8. int resultat = 0;
  9. int[] belegung = new int[n];
  10.  
  11. System.out.println(resultat);
  12. StringBuilder b = new StringBuilder();
  13. for (int i=0;i<n;i++)
  14. b.append(belegung[i] + " ");
  15. System.out.println(b.toString());
  16. }
  17.  
  18. public static void main(String[] args) throws java.io.IOException {
  19. int n = Integer.parseInt(in.readLine());
  20. int[] notes = new int[n];
  21. StringTokenizer t = new StringTokenizer(in.readLine());
  22. for (int i=0; i<n; i++)
  23. notes[i]=Integer.parseInt(t.nextToken());
  24.  
  25. piano(notes, n);
  26. }
  27. }
  28.  
Success #stdin #stdout 0.08s 380160KB
stdin
13
7 5 5 6 4 4 3 4 5 6 7 7 7
stdout
0
0 0 0 0 0 0 0 0 0 0 0 0 0