結果

問題 No.70 睡眠の重要性!
ユーザー srup٩(๑`н´๑)۶srup٩(๑`н´๑)۶
提出日時 2016-08-26 12:28:11
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 317 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-25 16:55:39
合計ジャッジ時間 596 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

n = input()

sum = 0
for i in range(0, n):
	d1, d2 = raw_input().split()
	h1, m1 = map(int, d1.split(':'))
	h2, m2 = map(int, d2.split(':'))
	if h1 > h2:
		time1 = h1 * 60 + m1
		time2 = (h2 + 24) * 60 + m2
		sum += time2 - time1
	else:
		time1 = h1 * 60 + m1
		time2 = h2 * 60 + m2
		sum += time2 - time1

print sum
0