jeongwon
[백준] 2525번 오븐 시계 본문
나의 답안:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int h, m, t, m2;
Scanner sc=new Scanner(System.in);
h=sc.nextInt();
m=sc.nextInt();
t=sc.nextInt();
sc.close();
m2=(m+t)%60;
h+=(m+t)/60;
if(h>=24)h=h-24;
System.out.println(h+" "+m2);
}
}
'오늘의 문제' 카테고리의 다른 글
| [백준 JAVA] 11021번 A+B (0) | 2022.05.19 |
|---|---|
| [백준] 2480번 주사위 세 개 (0) | 2022.05.18 |
| [자바의 정석 연습문제 9-6] System.arraycopy(), new String(char[]) (0) | 2022.05.16 |
| [백준] 2884번 - JAVA (0) | 2022.04.29 |
| [연습문제] 반복문 (0) | 2022.04.27 |