Skip to content

Commit

Permalink
Create S5_1476
Browse files Browse the repository at this point in the history
  • Loading branch information
RangKoon authored Jun 27, 2024
1 parent cc0e6eb commit abf08ce
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions 진민혁/S5_1476
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String input[] = br.readLine().split(" ");
int E = Integer.parseInt(input[0]);
int S = Integer.parseInt(input[1]);
int M = Integer.parseInt(input[2]);

int e = 0;
int s = 0;
int m = 0;
int cnt = 0;
while(true) {
e ++;
s ++;
m ++;
cnt ++;
if(e == 16)
e -= 15;
if(s == 29)
s -= 28;
if(m == 20)
m -= 19;

if(e == E && s == S && m == M)
break;
}
System.out.println(cnt);
}
}

0 comments on commit abf08ce

Please sign in to comment.