BOJ 문제풀이

백준 C++ 2884번 풀이

koreasunoo 2021. 7. 16. 00:30
SMALL

코드:

#include <iostream>
using namespace:: std;

int main(){
    int a, b;
    cin>>a>>b;
    if(b>=45){
        cout<<a<<" "<<b-45<<endl;
    }
    else{
        if(a>0){
            cout<<a-1<<" "<<b+15<<endl;
        }
        else{
            cout<<23<<" "<<b+15<<endl;
        }
    }
    return 0;
}
LIST

'BOJ 문제풀이' 카테고리의 다른 글

백준 1110번 c++ 풀이  (0) 2021.07.17
백준 10871번 c++ 풀이  (0) 2021.07.17
백준 11729번 파이썬 풀이  (0) 2021.07.15
백준 1436번 C언어 풀이  (0) 2021.07.11
백준 10250번 C 언어 풀이  (0) 2021.07.09