結果

問題 No.296 n度寝
ユーザー Hirotaka HanadaHirotaka Hanada
提出日時 2016-01-27 21:26:46
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 215 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 11,932 KB
実行使用メモリ 16,120 KB
最終ジャッジ日時 2023-10-21 16:25:21
合計ジャッジ時間 2,781 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

def getTime(n, h, m, t)
  for i in 1..n-1
    m = m + t
      if m > 59 then
        h = h + 1
        m = m % 60
      end
  end
puts h
puts m

end

N,H,M,T = gets.split(" ")
getTime(N.to_i, H.to_i, M.to_i, T.to_i)
0