結果

問題 No.70 睡眠の重要性!
ユーザー MamonboMamonbo
提出日時 2015-08-11 22:19:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 404 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-09-25 08:12:55
合計ジャッジ時間 782 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#coding=UTF-8

def timetomin(mojir):
    hyo=mojir.split(':')
    H=int(hyo[0])
    M=int(hyo[1])
    return H*60+M

N=int(input())

ans=0
for idx in range(0,N,1):
    mojir=input()
    hyo=mojir.split(' ')
    roughitme=timetomin(hyo[1])-timetomin(hyo[0])
    #1回の睡眠時間は0分以上24時間未満
    if roughitme < 0:
        roughitme=roughitme+24*60
    ans=ans+roughitme

print(ans)    

0