結果

問題 No.70 睡眠の重要性!
ユーザー gorugo30gorugo30
提出日時 2021-02-22 23:51:10
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 344 bytes
コンパイル時間 1,285 ms
コンパイル使用メモリ 81,544 KB
実行使用メモリ 53,384 KB
最終ジャッジ日時 2023-10-21 17:57:48
合計ジャッジ時間 1,023 ms
ジャッジサーバーID
(参考情報)
judge10 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

N = int(input())
ans = 0
for i in range(N):
    neta, okita = input().split()
    j = neta.index(":")
    H = int(neta[:j])
    M = int(neta[j + 1:])
    j = okita.index(":")
    h = int(okita[:j])
    m = int(okita[j + 1:])
    if H > h:
        H -= 24
    if M > m:
        M -= 60
        H += 1
    ans += (h - H) * 60 + (m - M)
print(ans)
0