BOJ 2525 오븐 시계

1 개요[ | ]

BOJ 2525 오븐 시계


2 C++[ | ]

#include <iostream>
using namespace std;

int main() {
    int A, B, C;
    cin >> A >> B >> C;
    B += C;
    if( B >= 60 ) {
        int hours = B/60;
        A += hours;
        B -= hours*60;
    }
    if( A >= 24 ) {
        int days = A/24;
        A -= days*24;
    }
    cout << A << ' ' << B << '\n';
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}