結果
問題 |
No.70 睡眠の重要性!
|
ユーザー |
|
提出日時 | 2017-12-30 20:39:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 389 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-21 13:28:21 |
合計ジャッジ時間 | 748 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 1 |
ソースコード
n = int(input()) total_sleep = 0 for i in range(n): time = input().split() sleep_h = int(time[0].split(":")[0]) sleep_m = int(time[0].split(":")[1]) wake_up_h = int(time[1].split(":")[0]) wake_up_m = int(time[1].split(":")[1]) if sleep_h > wake_up_h: wake_up_h += 24 total_sleep += wake_up_h * 60 + wake_up_m - sleep_h * 60 - sleep_m print(total_sleep)