結果

問題 No.70 睡眠の重要性!
ユーザー kisaragi211kisaragi211
提出日時 2018-01-22 17:51:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 15 ms / 5,000 ms
コード長 353 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2023-08-26 21:56:24
合計ジャッジ時間 829 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,856 KB
testcase_01 AC 15 ms
7,968 KB
testcase_02 AC 15 ms
7,944 KB
testcase_03 AC 15 ms
7,796 KB
testcase_04 AC 14 ms
7,912 KB
testcase_05 AC 15 ms
7,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    total = 0
    for x in range(N):
        S1, S2 = input().split()
        H, M = map(int, S1.split(':'))
        h, m = map(int, S2.split(':'))
        
        if H > h or (H == h and M > m):
            h += 24
        
        total += h*60 + m - (H*60 + M)
    print(total)

if __name__ == '__main__':
    main()
0