結果

問題 No.63 ポッキーゲーム
ユーザー jiro8719jiro8719
提出日時 2018-06-08 17:30:37
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 189 bytes
コンパイル時間 512 ms
コンパイル使用メモリ 11,528 KB
実行使用メモリ 19,736 KB
最終ジャッジ日時 2023-09-12 23:21:06
合計ジャッジ時間 9,233 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 80 ms
15,268 KB
testcase_03 WA -
testcase_04 AC 81 ms
15,156 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 130 ms
15,140 KB
testcase_10 WA -
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

input = gets.split(" ")
a = input[0].to_i
b = input[1].to_i
c = a
count = 0
loop do
    break if c <= 0
    c -= b * 2 
    break if c - (b * 2) <= 0
    count += 1
end
puts (b * count + c)
0