結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー gorugo30gorugo30
提出日時 2021-03-18 00:02:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 87,580 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-24 02:53:23
合計ジャッジ時間 5,767 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
87,580 KB
testcase_01 AC 115 ms
87,192 KB
testcase_02 AC 112 ms
87,240 KB
testcase_03 AC 115 ms
87,504 KB
testcase_04 AC 116 ms
87,420 KB
testcase_05 AC 112 ms
86,736 KB
testcase_06 AC 112 ms
87,312 KB
testcase_07 AC 113 ms
87,124 KB
testcase_08 AC 115 ms
87,252 KB
testcase_09 AC 112 ms
87,424 KB
testcase_10 AC 115 ms
86,720 KB
testcase_11 AC 114 ms
87,040 KB
testcase_12 AC 112 ms
87,320 KB
testcase_13 AC 112 ms
86,904 KB
testcase_14 AC 115 ms
86,964 KB
testcase_15 AC 114 ms
87,308 KB
testcase_16 AC 114 ms
86,724 KB
testcase_17 AC 113 ms
87,352 KB
testcase_18 AC 113 ms
87,208 KB
testcase_19 AC 111 ms
87,156 KB
testcase_20 AC 111 ms
87,336 KB
testcase_21 AC 113 ms
87,260 KB
testcase_22 AC 114 ms
87,468 KB
testcase_23 AC 113 ms
87,228 KB
testcase_24 AC 114 ms
87,044 KB
testcase_25 AC 113 ms
87,364 KB
testcase_26 AC 117 ms
87,156 KB
testcase_27 AC 113 ms
87,272 KB
testcase_28 AC 116 ms
87,436 KB
testcase_29 AC 112 ms
86,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
# ... 2 1 0 K ... 3 2 1
gr = (N - 1) % (K + 1)
x = gr
while 1:
    print(min(x, N - 1), flush = True)
    h = int(input())
    if h >= N:
        break
    x += K + 1
0