Skip to content

Commit

Permalink
feat(Sohee-An): [BOJ, 2525] 오븐 시계
Browse files Browse the repository at this point in the history
  • Loading branch information
soheeoott committed May 21, 2021
1 parent 611d6c4 commit 3e911b3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Sohee-An/src/baekjoon/BOJ_2525.java
@@ -0,0 +1,22 @@
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int hour = sc.nextInt();
int minute = sc.nextInt();
int time = sc.nextInt();
sc.close();

minute += time;
while(minute >= 60){
hour++;
minute -= 60;

if(hour >= 24){
hour = 0;
}
}
System.out.println(hour + " " + minute);
}
}

0 comments on commit 3e911b3

Please sign in to comment.