結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
31,048 KB
testcase_01 AC 124 ms
31,064 KB
testcase_02 AC 121 ms
31,108 KB
testcase_03 AC 123 ms
30,800 KB
testcase_04 AC 121 ms
30,964 KB
testcase_05 AC 124 ms
30,728 KB
testcase_06 AC 124 ms
30,844 KB
testcase_07 AC 123 ms
31,308 KB
testcase_08 AC 118 ms
30,764 KB
testcase_09 AC 120 ms
31,212 KB
testcase_10 AC 120 ms
31,088 KB
testcase_11 AC 122 ms
30,636 KB
testcase_12 AC 124 ms
31,084 KB
testcase_13 AC 120 ms
31,008 KB
testcase_14 AC 119 ms
31,004 KB
testcase_15 AC 119 ms
31,328 KB
testcase_16 AC 120 ms
31,040 KB
testcase_17 AC 124 ms
30,804 KB
testcase_18 AC 119 ms
31,456 KB
testcase_19 AC 120 ms
30,620 KB
testcase_20 AC 120 ms
31,096 KB
testcase_21 AC 120 ms
30,932 KB
testcase_22 AC 118 ms
30,896 KB
testcase_23 AC 117 ms
30,768 KB
testcase_24 AC 117 ms
30,996 KB
testcase_25 AC 120 ms
30,832 KB
testcase_26 AC 119 ms
30,672 KB
testcase_27 AC 118 ms
31,036 KB
testcase_28 AC 115 ms
31,336 KB
testcase_29 AC 122 ms
30,924 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