結果

問題 No.296 n度寝
ユーザー gemmarogemmaro
提出日時 2019-10-13 08:51:33
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 11,164 KB
実行使用メモリ 15,408 KB
最終ジャッジ日時 2023-08-21 00:59:06
合計ジャッジ時間 2,956 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 82 ms
15,132 KB
testcase_04 AC 80 ms
15,272 KB
testcase_05 AC 79 ms
15,124 KB
testcase_06 AC 80 ms
15,196 KB
testcase_07 WA -
testcase_08 AC 81 ms
15,128 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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

minute_alert = h * 60 + m                                              
minute_additional_sleep = n * t
minute_wake_up = minute_alert + minute_additional_sleep
minute_wake_up = minute_wake_up % (24 * 60)

p minute_wake_up / 60
p minute_wake_up % 60 - t
0