/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
random.
setSeed(System.
currentTimeMillis());
int num=0;
System.
out.
println("\n\t<<<< 로또복권 >>>>\n"); do{
random.
setSeed(System.
currentTimeMillis()); int a= (1+random.nextInt(45));
int b= (1+random.nextInt(45));
int c= (1+random.nextInt(45));
int d= (1+random.nextInt(45));
int e= (1+random.nextInt(45));
int f= (1+random.nextInt(45));
if (a!=b & b!=c & d!=e & e!=f & a!=c & a!=d & a!=e & a!=f & b!=d & b!=e& b!=f & c!=d & c!=e & c!=f & d!=f) {
int temp;
int[] show = new int[6];
show[0] = a;
show[1] = b;
show[2] = c;
show[3] = d;
show[4] = e;
show[5] = f;
for (int i=0; i<show.length-1;i++) {
for (int j=i+1; j<show.length;j++) {
if(show[i]<show[j]) {
temp = show[i];
show[i] = show[j];
show[j] = temp;
}
}
}
System.
out.
print(" "+show
[5]+"\t"); System.
out.
print(show
[4]+"\t"); System.
out.
print(show
[3]+"\t"); System.
out.
print(show
[2]+"\t"); System.
out.
print(show
[1]+"\t"); System.
out.
println(show
[0]+"\t"); num++;
}
} while(num!=5);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewogICAgICAKICAgICAgUmFuZG9tIHJhbmRvbSA9IG5ldyBSYW5kb20oKTsKICAgICAgIHJhbmRvbS5zZXRTZWVkKFN5c3RlbS5jdXJyZW50VGltZU1pbGxpcygpKTsKICAgICAgIAogICAgICAgaW50IG51bT0wOwogICAgICAgCiAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIlxuXHQ8PDw8ICAgIOuhnOuYkOuzteq2jCAgICAgICAgPj4+PlxuIik7CiAgICAgIGRvewogICAgICAgICAKICAgICAgICAgcmFuZG9tLnNldFNlZWQoU3lzdGVtLmN1cnJlbnRUaW1lTWlsbGlzKCkpOwogICAgICAgICBpbnQgYT0gKDErcmFuZG9tLm5leHRJbnQoNDUpKTsKICAgICAgICAgVGhyZWFkLnNsZWVwKChTeXN0ZW0uY3VycmVudFRpbWVNaWxsaXMoKSUxMDApKTsKICAgICAgICAgCiAgICAgICAgIGludCBiPSAoMStyYW5kb20ubmV4dEludCg0NSkpOwogICAgICAgICBUaHJlYWQuc2xlZXAoKFN5c3RlbS5jdXJyZW50VGltZU1pbGxpcygpJTEwMCkpOwogICAgICAgICAKICAgICAgICAgaW50IGM9ICgxK3JhbmRvbS5uZXh0SW50KDQ1KSk7CiAgICAgICAgIFRocmVhZC5zbGVlcCgoU3lzdGVtLmN1cnJlbnRUaW1lTWlsbGlzKCklMTAwKSk7CiAgICAgICAgIAogICAgICAgICBpbnQgZD0gKDErcmFuZG9tLm5leHRJbnQoNDUpKTsKICAgICAgICAgCiAgICAgICAgIGludCBlPSAoMStyYW5kb20ubmV4dEludCg0NSkpOwogICAgICAgICBUaHJlYWQuc2xlZXAoKFN5c3RlbS5jdXJyZW50VGltZU1pbGxpcygpJTEwMCkpOwogICAgICAgICAKICAgICAgICAgaW50IGY9ICgxK3JhbmRvbS5uZXh0SW50KDQ1KSk7CiAgICAgICAgIFRocmVhZC5zbGVlcCgoU3lzdGVtLmN1cnJlbnRUaW1lTWlsbGlzKCklMTAwKSk7CiAgICAgICAgIAogICAgICAgICBpZiAoYSE9YiAmIGIhPWMgJiBkIT1lICYgZSE9ZiAmIGEhPWMgJiBhIT1kICYgYSE9ZSAmIGEhPWYgJiBiIT1kICYgYiE9ZSYgYiE9ZiAmIGMhPWQgJiBjIT1lICYgYyE9ZiAmIGQhPWYpIHsKICAgICAgICAgICAgaW50IHRlbXA7CiAgICAgICAgICAgIGludFtdIHNob3cgPSBuZXcgaW50WzZdOwogICAgICAgICAgICBzaG93WzBdID0gYTsKICAgICAgICAgICAgc2hvd1sxXSA9IGI7CiAgICAgICAgICAgIHNob3dbMl0gPSBjOwogICAgICAgICAgICBzaG93WzNdID0gZDsKICAgICAgICAgICAgc2hvd1s0XSA9IGU7CiAgICAgICAgICAgIHNob3dbNV0gPSBmOwogICAgICAgICAgICBmb3IgKGludCBpPTA7IGk8c2hvdy5sZW5ndGgtMTtpKyspIHsKICAgICAgICAgICAgICAgZm9yIChpbnQgaj1pKzE7IGo8c2hvdy5sZW5ndGg7aisrKSB7CiAgICAgICAgICAgICAgICAgIGlmKHNob3dbaV08c2hvd1tqXSkgewogICAgICAgICAgICAgICAgICAgICB0ZW1wID0gc2hvd1tpXTsKICAgICAgICAgICAgICAgICAgICAgc2hvd1tpXSA9IHNob3dbal07CiAgICAgICAgICAgICAgICAgICAgIHNob3dbal0gPSB0ZW1wOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgIAogICAgICAgICAgICB9CiAgICAgICAgICAgIAogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50KCIgIitzaG93WzVdKyJcdCIpOwogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50KHNob3dbNF0rIlx0Iik7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnQoc2hvd1szXSsiXHQiKTsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludChzaG93WzJdKyJcdCIpOwogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50KHNob3dbMV0rIlx0Iik7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbihzaG93WzBdKyJcdCIpOwogICAgICAgICAgICBudW0rKzsKICAgICAgICAgfQogICAgICAgICAKICAgICAgfSB3aGlsZShudW0hPTUpOwoKICAgfQoKfQ==