-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMathematica.java
43 lines (32 loc) · 1019 Bytes
/
Mathematica.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
public class Mathematica {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int x,y = 0;
outerloop:
for(x=1;x<10000000;x++){
for(y=1;y<1000000;y++){
if((x+y)%10==2){
int sum=x+y;
if((x+sum)%10==5){
sum=x+sum;
if((y+sum)%10==2){
sum=y+sum;
if((x+sum)%10==5)
sum=x+sum;
if((y+sum)%10==2){
sum=y+sum;
if((x+sum)%10==5){
sum=x+sum;
break outerloop;
}
}
}
}
}
}
}
System.out.println(x+"\n"+y);
}
}