- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1476.java
More file actions
Latest commit
29 lines (23 loc) · 578 Bytes
/
Copy path1476.java
File metadata and controls
29 lines (23 loc) · 578 Bytes
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
importjava.util.*;
publicclassMain {
publicstaticvoidmain(String[] args) {
Scannersc = newScanner(System.in);
inte = sc.nextInt(); // 1~15
ints = sc.nextInt(); // 1~28
intm = sc.nextInt(); // 1~19
inta=0, b=0, c=0, cnt=0;
while(!(a==e && b==s && c==m)) {
a++;
b++;
c++;
cnt++;
if(a>15)
a = 1;
if(b>28)
b = 1;
if(c>19)
c = 1;
}
System.out.println(cnt);
}
}