結果

問題 No.296 n度寝
ユーザー abinullabinull
提出日時 2021-12-14 23:19:13
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 168 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 11,388 KB
実行使用メモリ 15,376 KB
最終ジャッジ日時 2023-10-01 02:14:05
合計ジャッジ時間 3,011 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 83 ms
15,292 KB
testcase_04 AC 84 ms
15,052 KB
testcase_05 AC 83 ms
15,288 KB
testcase_06 AC 83 ms
15,244 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 83 ms
15,256 KB
testcase_11 AC 83 ms
15,244 KB
testcase_12 WA -
testcase_13 AC 83 ms
15,056 KB
testcase_14 AC 83 ms
15,156 KB
testcase_15 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n, h, m, t = gets.chomp!.split(' ').map(&:to_i)

wakeup = (n - 1) * t

m += wakeup

if m > 59
  m = (m % 59) - 1
  h += 1
end

h = (h % 23) -1 if h > 23

puts h
puts m
0