fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int count = 20;
  13. int[] numbers = new int[count];
  14.  
  15. for (int j = 0; j < count; ++j) {
  16. if (j == 0) {
  17. numbers[j] = (count - j) * 1;
  18. }
  19.  
  20. numbers[j] = (count - j) * j;
  21. System.out.println(j + ": " + count);
  22. }
  23. }
  24. }
Success #stdin #stdout 0.04s 2184192KB
stdin
Standard input is empty
stdout
0: 20
1: 20
2: 20
3: 20
4: 20
5: 20
6: 20
7: 20
8: 20
9: 20
10: 20
11: 20
12: 20
13: 20
14: 20
15: 20
16: 20
17: 20
18: 20
19: 20