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.  
  13. System.out.println("\n\t<<<< 연금 복권 >>>>\n");
  14.  
  15. Random random = new Random();
  16. random.setSeed(System.currentTimeMillis());
  17.  
  18. int num=0;
  19. //List listA = new ArrayList();
  20. //List listB = new ArrayList();
  21. do{
  22. random.setSeed(System.currentTimeMillis());
  23. int jo = random.nextInt(5);
  24.  
  25. Thread.sleep(System.currentTimeMillis()%250);
  26. random.setSeed(System.currentTimeMillis());
  27. int a= (random.nextInt(10));
  28.  
  29. Thread.sleep(System.currentTimeMillis()%250);
  30.  
  31. random.setSeed(System.currentTimeMillis());
  32. int b= (random.nextInt(10));
  33. Thread.sleep(System.currentTimeMillis()%250);
  34.  
  35. random.setSeed(System.currentTimeMillis());
  36. int c= (random.nextInt(10));
  37. Thread.sleep(System.currentTimeMillis()%250);
  38.  
  39. random.setSeed(System.currentTimeMillis());
  40. int d= (random.nextInt(10));
  41. Thread.sleep(System.currentTimeMillis()%250);
  42.  
  43. random.setSeed(System.currentTimeMillis());
  44. int e= (random.nextInt(10));
  45. Thread.sleep(System.currentTimeMillis()%250);
  46.  
  47. random.setSeed(System.currentTimeMillis());
  48. int f= (random.nextInt(10));
  49.  
  50. //if(!listA.contains(f) && !listB.contains(jo) ){
  51.  
  52. System.out.print("조 : " + (jo+1));
  53. System.out.println("\t6자리 번호 : "
  54. +a+b+c+d+e+f);
  55. //listA.add(f);
  56. //listB.add(jo);
  57.  
  58. num ++;
  59. //}
  60.  
  61. } while(num!=5);
  62.  
  63.  
  64. }
  65.  
  66. }
Success #stdin #stdout 0.2s 58060KB
stdin
Standard input is empty
stdout
	<<<<   연금 복권    >>>>

조 : 2	6자리 번호 : 235462
조 : 2	6자리 번호 : 520180
조 : 1	6자리 번호 : 396708
조 : 4	6자리 번호 : 516467
조 : 3	6자리 번호 : 377145