[백준] 2525번 : 오븐 시계 - Java(자바)

강재원·2022년 9월 14일
0

[코딩테스트] Java

목록 보기
31/200



https://www.acmicpc.net/problem/2525

import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s=new Scanner(System.in);
        int h=s.nextInt();
        int m=s.nextInt();
        int n=s.nextInt();
        int sum=m+n;
        h+=sum/60;
        sum%=60;
        h%=24;
        System.out.format("%d %d",h,sum);
    }
}
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글