結果
問題 |
No.70 睡眠の重要性!
|
ユーザー |
|
提出日時 | 2024-10-19 09:22:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 5,000 ms |
コード長 | 660 bytes |
コンパイル時間 | 282 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-19 09:22:09 |
合計ジャッジ時間 | 1,299 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
n = int(input()) time_lst = [ list(map(str, input().split(' '))) for i in range(n) ] time = 0 for time_pair in time_lst: time_sleep = time_pair[0] time_awake = time_pair[1] time_sleep_hour, time_sleep_minute = map(int, time_sleep.split(':')) time_awake_hour, time_awake_minute = map(int, time_awake.split(':')) hour_to_sleep = time_awake_hour - time_sleep_hour minute_to_sleep = time_awake_minute - time_sleep_minute if minute_to_sleep < 0: minute_to_sleep += 60 hour_to_sleep -= 1 if hour_to_sleep < 0: hour_to_sleep += 24 time += minute_to_sleep time += hour_to_sleep*60 print(time)