[문제 링크] : https://www.acmicpc.net/problem/5928
#include <iostream>
using namespace std;
int D, H, M;
int main(){
cin >> D >> H >> M;
int tmp = 11 + 11 * 60 + 11 * 60 * 24;
int Ans = M + H * 60 + D * 60 * 24 - tmp;
if(Ans < 0){
cout << -1 <<"\n";
}
else{
cout << Ans <<"\n";
}
return 0;
}
'알고리즘' 카테고리의 다른 글
[알고리즘] 백준 13597 - Tri-du (C++) (0) | 2025.02.24 |
---|---|
[알고리즘] 백준 10419 - 지각 (C++) (0) | 2025.02.23 |
[알고리즘] 백준 29699 - Welcome to SMUPC (C++) (0) | 2025.02.21 |
[알고리즘] 백준 26209 - Intercepting Information (C++) (0) | 2025.02.20 |
[알고리즘] 백준 27389 - Metronome (C++) (0) | 2025.02.19 |