結果
問題 | No.70 睡眠の重要性! |
ユーザー |
![]() |
提出日時 | 2017-11-04 20:54:51 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 515 bytes |
コンパイル時間 | 86 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-24 01:13:50 |
合計ジャッジ時間 | 835 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 1 |
ソースコード
n = int(input()) input_list = [] for i in range(n): input_list.append(list(input().split())) amount = 0 for e in input_list: down_h, down_m = map(int, str(e[0]).split(':')) up_h, up_m = map(int, str(e[1]).split(':')) sleep_m = up_m - down_m sleep_h = up_h - down_h if sleep_h < 0: sleep_h += 24 if sleep_m < 0: sleep_h -= 1 sleep_m += 60 if sleep_m >= 60: sleep_h += 1 sleep_m -= 60 amount += (sleep_h * 60) + sleep_m print(amount)