結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
30,796 KB
testcase_01 AC 118 ms
30,876 KB
testcase_02 AC 121 ms
30,876 KB
testcase_03 AC 116 ms
31,356 KB
testcase_04 AC 120 ms
30,896 KB
testcase_05 AC 121 ms
31,332 KB
testcase_06 AC 118 ms
31,412 KB
testcase_07 AC 114 ms
30,932 KB
testcase_08 AC 117 ms
31,104 KB
testcase_09 AC 118 ms
30,720 KB
testcase_10 AC 118 ms
31,452 KB
testcase_11 AC 119 ms
31,032 KB
testcase_12 AC 123 ms
31,316 KB
testcase_13 AC 117 ms
31,128 KB
testcase_14 AC 116 ms
30,984 KB
testcase_15 AC 120 ms
30,852 KB
testcase_16 AC 119 ms
30,732 KB
testcase_17 AC 122 ms
31,232 KB
testcase_18 AC 120 ms
31,204 KB
testcase_19 AC 122 ms
30,924 KB
testcase_20 AC 121 ms
31,108 KB
testcase_21 AC 125 ms
30,784 KB
testcase_22 AC 122 ms
31,380 KB
testcase_23 AC 122 ms
31,104 KB
testcase_24 AC 127 ms
30,768 KB
testcase_25 AC 122 ms
31,276 KB
testcase_26 AC 122 ms
30,948 KB
testcase_27 AC 127 ms
31,004 KB
testcase_28 AC 127 ms
30,772 KB
testcase_29 AC 127 ms
30,660 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