結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー brthyyjpbrthyyjp
提出日時 2021-04-14 00:32:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 87,604 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-24 02:56:42
合計ジャッジ時間 5,165 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
87,412 KB
testcase_01 AC 101 ms
87,392 KB
testcase_02 AC 99 ms
87,320 KB
testcase_03 AC 98 ms
87,148 KB
testcase_04 AC 97 ms
87,160 KB
testcase_05 AC 99 ms
86,956 KB
testcase_06 AC 100 ms
86,940 KB
testcase_07 AC 100 ms
87,344 KB
testcase_08 AC 98 ms
87,604 KB
testcase_09 AC 100 ms
87,108 KB
testcase_10 AC 100 ms
87,036 KB
testcase_11 AC 99 ms
86,788 KB
testcase_12 AC 97 ms
87,028 KB
testcase_13 AC 107 ms
87,064 KB
testcase_14 AC 100 ms
87,228 KB
testcase_15 AC 100 ms
86,924 KB
testcase_16 AC 99 ms
87,512 KB
testcase_17 AC 98 ms
87,424 KB
testcase_18 AC 98 ms
87,396 KB
testcase_19 AC 97 ms
87,224 KB
testcase_20 AC 103 ms
87,128 KB
testcase_21 AC 100 ms
87,040 KB
testcase_22 AC 99 ms
87,560 KB
testcase_23 AC 97 ms
86,904 KB
testcase_24 AC 98 ms
87,404 KB
testcase_25 AC 98 ms
87,016 KB
testcase_26 AC 99 ms
87,024 KB
testcase_27 AC 100 ms
87,324 KB
testcase_28 AC 99 ms
87,536 KB
testcase_29 AC 97 ms
87,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int,input().split())
if (n-1)%(k+1) == 0:
    a = 0
    print(a, flush=True)
    while True:
        b = int(input())
        if b >= n:
            exit()
        a += k+1
        print(a, flush=True)
else:
    a = n-1-((n-1)//(k+1))*(k+1)
    print(a, flush=True)
    while True:
        b = int(input())
        if b >= n:
            exit()
        a += k+1
        print(a, flush=True)
0