結果

問題 No.296 n度寝
ユーザー rikiyarikiya
提出日時 2017-07-03 17:07:28
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 214 bytes
コンパイル時間 45 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-04-15 14:39:03
合計ジャッジ時間 2,718 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 92 ms
12,160 KB
testcase_04 AC 91 ms
12,288 KB
testcase_05 AC 93 ms
12,160 KB
testcase_06 AC 92 ms
12,288 KB
testcase_07 WA -
testcase_08 AC 182 ms
12,160 KB
testcase_09 WA -
testcase_10 AC 91 ms
12,288 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 91 ms
12,288 KB
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - i
Syntax OK

ソースコード

diff #

count, hour, minute, time = gets.chomp.split(" ").map(&:to_i)
for i in 1...count do 
	minute += time
	if minute >= 60
		minute = 0
		hour += 1
	end
	if hour == 24
		hour = 0
	end
end
printf "%d\n%d\n", hour, minute
0