結果

問題 No.70 睡眠の重要性!
ユーザー fV9TwBhUoa9S3eVfV9TwBhUoa9S3eV
提出日時 2019-09-17 08:27:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 472 bytes
コンパイル時間 842 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2023-09-21 13:05:33
合計ジャッジ時間 910 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

N = int(input())
minutes_total = 0

for i in range(N):
    time_get_up, time_go_to_bed = [s for s in input().split()]
    hours_go_to_bed, minutes_go_to_bed = [int(i) for i in time_get_up.split(':')]
    hours_get_up, minutes_get_up = [int(i) for i in time_go_to_bed.split(':')]

    if hours_go_to_bed > hours_get_up:
        hours_get_up += 24

    minutes_total += (hours_get_up * 60 + minutes_get_up) - (hours_go_to_bed * 60 + minutes_go_to_bed)

print(minutes_total)
0