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