結果

問題 No.70 睡眠の重要性!
ユーザー R NR N
提出日時 2020-08-22 16:49:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 367 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-23 10:56:34
合計ジャッジ時間 689 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 AC 25 ms
10,624 KB
testcase_03 AC 25 ms
10,752 KB
testcase_04 AC 26 ms
10,752 KB
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding:utf-8
n = int(input())
total = 0
for i in range(n):
    s, g = map(str, input().split())
    sl = list(map(int,s.split(':')))
    gl = list(map(int,g.split(':')))
    if gl[0] - sl[0] < 0:
        dt1 = gl[0] + 24 - sl[0]
        dt2 = gl[1] - sl[1]
    else:
        dt1 = gl[0] - sl[0]
        dt2 = gl[1] - sl[1]
    total += (dt1 * 60) + dt2
print(total)
0