結果

問題 No.70 睡眠の重要性!
ユーザー bellangeldindonbellangeldindon
提出日時 2019-05-07 16:03:38
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 324 bytes
コンパイル時間 612 ms
コンパイル使用メモリ 6,600 KB
実行使用メモリ 6,084 KB
最終ジャッジ日時 2023-09-14 16:26:35
合計ジャッジ時間 1,189 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

def timecalc(h, m):
	return 60*h+m
N = int(raw_input())
sum = 0
for i in range(0, N):
	inpt = raw_input().split()
	sleep = map(int, inpt[0].split(':'))
	awake = map(int, inpt[1].split(':'))
	sm = timecalc(sleep[0], sleep[1])
	wm = timecalc(awake[0], awake[1])
	if wm < sm: sum += (1440-sm) + wm
	else: sum += wm-sm
print sum
0