結果
問題 | No.70 睡眠の重要性! |
ユーザー |
![]() |
提出日時 | 2017-11-04 21:09:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 5,000 ms |
コード長 | 575 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-24 01:14:01 |
合計ジャッジ時間 | 881 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
n = int(input())input_list = []for i in range(n):input_list.append(list(input().split()))amount = 0for 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_msleep_h = up_h - down_hif sleep_h == 0 and sleep_m < 0:sleep_h += 24if sleep_h < 0:sleep_h += 24if sleep_m < 0:sleep_h -= 1sleep_m += 60if sleep_m >= 60:sleep_h += 1sleep_m -= 60amount += (sleep_h * 60) + sleep_mprint(amount)