結果

問題 No.296 n度寝
ユーザー kazukikazuki
提出日時 2019-02-02 22:23:35
言語 Ruby
(3.3.0)
結果
AC  
実行時間 82 ms / 1,000 ms
コード長 162 bytes
コンパイル時間 512 ms
コンパイル使用メモリ 11,352 KB
実行使用メモリ 15,360 KB
最終ジャッジ日時 2023-08-19 20:01:49
合計ジャッジ時間 3,296 ms
ジャッジサーバーID
(参考情報)
judge14 / judge10
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,272 KB
testcase_01 AC 81 ms
15,360 KB
testcase_02 AC 81 ms
15,016 KB
testcase_03 AC 81 ms
15,188 KB
testcase_04 AC 82 ms
15,284 KB
testcase_05 AC 82 ms
15,056 KB
testcase_06 AC 81 ms
15,056 KB
testcase_07 AC 80 ms
15,120 KB
testcase_08 AC 81 ms
15,052 KB
testcase_09 AC 80 ms
15,024 KB
testcase_10 AC 79 ms
15,152 KB
testcase_11 AC 81 ms
15,088 KB
testcase_12 AC 81 ms
15,060 KB
testcase_13 AC 82 ms
15,088 KB
testcase_14 AC 80 ms
14,960 KB
testcase_15 AC 79 ms
14,968 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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


h_after = h+(n-1)*t/60
m_after = m+(n-1)*t%60

h_after += m_after/60
m_after %= 60
h_after %= 24

puts h_after
puts m_after
0