Algorithm/[BOJ] - JAVA
[백준] 2525 : 오븐 시계 JAVA 풀이
Codew
2022. 5. 9. 20:56
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int H = in.nextInt();
int M = in.nextInt();
int time = in.nextInt();
H = H+(M+time)/60;
M = (M+time)%60;
if(H>23) H = H-24;
System.out.println(H+" "+M);
}
}