結果

問題 No.70 睡眠の重要性!
ユーザー utsumidaisukeutsumidaisuke
提出日時 2017-12-30 20:39:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 389 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 7,948 KB
最終ジャッジ日時 2023-08-23 11:07:47
合計ジャッジ時間 843 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,912 KB
testcase_01 AC 16 ms
7,848 KB
testcase_02 AC 15 ms
7,824 KB
testcase_03 AC 16 ms
7,904 KB
testcase_04 AC 16 ms
7,816 KB
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0