結果
| 問題 |
No.70 睡眠の重要性!
|
| コンテスト | |
| ユーザー |
tottoripaper
|
| 提出日時 | 2018-01-07 01:40:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 292 bytes |
| コンパイル時間 | 396 ms |
| コンパイル使用メモリ | 30,720 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 09:21:25 |
| 合計ジャッジ時間 | 906 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include <cstdio>
int main(){
int N;
scanf("%d", &N);
int sum = 0;
int H, h, M, m;
for(int i=0;i<N;i++){
scanf("%d:%d %d:%d", &H, &M, &h, &m);
if(H > h || (H == h && M > m)){h += 24;}
sum += (h-H) * 60 + (m-M);
}
printf("%d\n", sum);
}
tottoripaper