fork(2) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. class Main{
  4. public static void main(String[] a){
  5. for(int j = 2; j < 11; j++){
  6. System.out.print("BASE-" + j + ": ");
  7. for(int i = 1; i < 11; i++){
  8. String s = Integer.toString(i, j);
  9. if(Integer.parseInt(s) < 11){
  10. System.out.print(s + " ");
  11. }
  12. }
  13. System.out.println();
  14. }
  15. }
  16. }
Success #stdin #stdout 0.11s 320576KB
stdin
Standard input is empty
stdout
BASE-2: 1 10 
BASE-3: 1 2 10 
BASE-4: 1 2 3 10 
BASE-5: 1 2 3 4 10 
BASE-6: 1 2 3 4 5 10 
BASE-7: 1 2 3 4 5 6 10 
BASE-8: 1 2 3 4 5 6 7 10 
BASE-9: 1 2 3 4 5 6 7 8 10 
BASE-10: 1 2 3 4 5 6 7 8 9 10