結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー nanaenanae
提出日時 2017-02-23 05:10:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 459 bytes
コンパイル時間 526 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 24,348 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-24 00:54:53
合計ジャッジ時間 4,021 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
23,660 KB
testcase_01 AC 60 ms
23,736 KB
testcase_02 AC 60 ms
23,560 KB
testcase_03 AC 61 ms
23,412 KB
testcase_04 AC 60 ms
24,348 KB
testcase_05 AC 61 ms
23,556 KB
testcase_06 AC 61 ms
23,508 KB
testcase_07 AC 61 ms
23,432 KB
testcase_08 AC 61 ms
23,760 KB
testcase_09 AC 62 ms
23,556 KB
testcase_10 AC 60 ms
23,640 KB
testcase_11 AC 61 ms
23,592 KB
testcase_12 AC 61 ms
23,568 KB
testcase_13 AC 60 ms
23,368 KB
testcase_14 AC 59 ms
23,964 KB
testcase_15 AC 60 ms
23,952 KB
testcase_16 AC 59 ms
24,000 KB
testcase_17 AC 61 ms
23,928 KB
testcase_18 AC 61 ms
23,916 KB
testcase_19 AC 60 ms
24,324 KB
testcase_20 AC 59 ms
23,372 KB
testcase_21 AC 61 ms
23,328 KB
testcase_22 AC 60 ms
23,460 KB
testcase_23 AC 59 ms
24,120 KB
testcase_24 AC 59 ms
24,288 KB
testcase_25 AC 60 ms
23,580 KB
testcase_26 AC 60 ms
23,668 KB
testcase_27 AC 60 ms
23,548 KB
testcase_28 AC 59 ms
23,628 KB
testcase_29 AC 60 ms
23,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def solve():
    N, K = map(int, input().split())
    A = (N - 1) % (K + 1)
    print(A, flush=True)

    while 1:
        B = int(input())

        if B >= N:
            return None

        A += K + 1
        print(A, flush=True)


def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

if __name__ == '__main__':
    solve()
0