結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー 小指が強い人小指が強い人
提出日時 2015-11-15 15:20:35
言語 Ruby
(3.3.0)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 11,392 KB
実行使用メモリ 31,448 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-23 21:59:16
合計ジャッジ時間 6,218 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
30,904 KB
testcase_01 AC 134 ms
30,904 KB
testcase_02 AC 129 ms
31,268 KB
testcase_03 AC 128 ms
31,000 KB
testcase_04 AC 127 ms
30,760 KB
testcase_05 AC 127 ms
31,288 KB
testcase_06 AC 126 ms
30,848 KB
testcase_07 AC 126 ms
30,680 KB
testcase_08 AC 127 ms
31,388 KB
testcase_09 AC 129 ms
31,000 KB
testcase_10 AC 131 ms
30,948 KB
testcase_11 AC 132 ms
31,332 KB
testcase_12 AC 130 ms
30,920 KB
testcase_13 AC 128 ms
30,832 KB
testcase_14 AC 128 ms
31,312 KB
testcase_15 AC 129 ms
31,384 KB
testcase_16 AC 128 ms
31,372 KB
testcase_17 AC 127 ms
30,912 KB
testcase_18 AC 126 ms
31,448 KB
testcase_19 AC 128 ms
31,316 KB
testcase_20 AC 128 ms
31,032 KB
testcase_21 AC 131 ms
30,992 KB
testcase_22 AC 130 ms
30,616 KB
testcase_23 AC 130 ms
31,204 KB
testcase_24 AC 130 ms
31,140 KB
testcase_25 AC 129 ms
31,120 KB
testcase_26 AC 131 ms
31,116 KB
testcase_27 AC 129 ms
30,788 KB
testcase_28 AC 131 ms
31,056 KB
testcase_29 AC 129 ms
31,056 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

str = gets.split
n = str[0].to_i
k = str[1].to_i
e = "0"
mv = (n + k) % (k + 1)
while e != nil do
    puts mv
    STDOUT.flush
    mv += k + 1
    e = gets
    if e == nil || e.to_i >= n
        break
    end
end
0