結果

問題 No.70 睡眠の重要性!
ユーザー machoniumpmachoniump
提出日時 2023-09-21 23:53:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 260 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 7,912 KB
最終ジャッジ日時 2023-09-21 23:53:12
合計ジャッジ時間 809 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

n=int(input())
ans=0
def solve(a,b):
    H,M=map(int,a.split(":"))
    h,m=map(int,b.split(":"))
    if H>h or (h==H and M>m):
        h+=24
    return 60*(h-H)+m-M
for i in range(n):
    hm=list(map(str,input().split()))
    ans+=solve(hm[0],hm[1])
print(ans)
0