結果

問題 No.70 睡眠の重要性!
ユーザー fV9TwBhUoa9S3eVfV9TwBhUoa9S3eV
提出日時 2019-09-17 08:33:18
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 572 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2023-09-21 13:05:39
合計ジャッジ時間 718 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

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(':')]

    converted_go_to_bed = hours_go_to_bed * 60 + minutes_go_to_bed
    converted_get_up = hours_get_up * 60 + minutes_get_up

    if converted_go_to_bed > converted_get_up:
        converted_get_up += 24 * 60

    minutes_total += converted_get_up - converted_go_to_bed

print(minutes_total)
0