結果

問題 No.70 睡眠の重要性!
ユーザー sasakitikitisasakitikiti
提出日時 2016-08-03 10:13:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 28 ms / 5,000 ms
コード長 428 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-24 15:11:48
合計ジャッジ時間 721 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 AC 25 ms
10,752 KB
testcase_02 AC 28 ms
10,752 KB
testcase_03 AC 28 ms
10,752 KB
testcase_04 AC 27 ms
10,752 KB
testcase_05 AC 26 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

h=int()
m=int()

for i in range(int(input())):
    n,l=input().split()
    h1,m1=(int(i) for i in n.split(":"))
    h2,m2=(int(i) for i in l.split(":"))
   
    if int(h2)<int(h1):
        h=int(h)+int(h2)+int(24)-int(h1)
    else:
        h=int(h)+int(h2)-int(h1)
    if m2<m1:
        m=int(m)+int(m2)+int(60)-int(m1)
        h=h-1
    else:
        m=int(m)+int(m2)-int(m1)
    i=i+1

if h==-1:
    h=23
   
print(h*60+m)    
0