結果

問題 No.70 睡眠の重要性!
ユーザー PalearcticPalearctic
提出日時 2018-08-31 02:01:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 521 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 10,936 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-10-11 21:48:15
合計ジャッジ時間 848 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

timedata=[]
N=int(input())
for H in range(N):
    a=list(map(int,input().replace(":"," ").split()))
    timedata.append(a)

def dt(a):
    i=0
    if(a[1]>a[3]):
        a[0]+=1
    while(True):
        if(a[1]==a[3]):
            dm=i
            i=0
            break
        a[1]=(a[1]+1)%60
        i+=1

    while(True):
        if(a[0]==a[2]):
            dh=i
            i=0
            break
        a[0]=(a[0]+1)%24
        i+=1
    return dm+dh*60

sum=0
for i in range(N):
     sum+=dt(timedata[i])
print(sum)
0