結果

問題 No.296 n度寝
ユーザー rf141rf141
提出日時 2015-11-06 22:44:39
言語 Python2
(2.7.18)
結果
AC  
実行時間 238 ms / 1,000 ms
コード長 277 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 6,520 KB
実行使用メモリ 37,548 KB
最終ジャッジ日時 2023-09-21 03:44:05
合計ジャッジ時間 2,044 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 224 ms
30,688 KB
testcase_01 AC 81 ms
15,576 KB
testcase_02 AC 34 ms
9,180 KB
testcase_03 AC 11 ms
6,024 KB
testcase_04 AC 12 ms
5,856 KB
testcase_05 AC 11 ms
6,064 KB
testcase_06 AC 11 ms
5,860 KB
testcase_07 AC 238 ms
37,548 KB
testcase_08 AC 173 ms
37,548 KB
testcase_09 AC 11 ms
5,956 KB
testcase_10 AC 12 ms
5,864 KB
testcase_11 AC 11 ms
5,872 KB
testcase_12 AC 11 ms
5,956 KB
testcase_13 AC 12 ms
6,092 KB
testcase_14 AC 11 ms
5,872 KB
testcase_15 AC 11 ms
5,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,h,m,t = map(int,raw_input().split())

next_hour = t/60
next_min = t%60

if n == 1 :
	print(h)
	print(m)
else:
	for i in range(n-1):
		h=h+next_hour
		m=m+next_min
	if 60 <= m:
		h=h+m/60
		while(60 <= m):
			m=m-60
	if 24 <= h:
		while(24 <= h):
			h=h-24
	print(h)
	print(m)
0