結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー parukiparuki
提出日時 2016-12-23 21:14:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 273 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 10,600 KB
実行使用メモリ 24,336 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-24 00:48:45
合計ジャッジ時間 3,639 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
23,940 KB
testcase_01 AC 55 ms
23,952 KB
testcase_02 AC 55 ms
23,664 KB
testcase_03 AC 55 ms
23,616 KB
testcase_04 AC 57 ms
23,964 KB
testcase_05 AC 54 ms
24,216 KB
testcase_06 AC 54 ms
23,356 KB
testcase_07 AC 55 ms
23,592 KB
testcase_08 AC 54 ms
24,336 KB
testcase_09 AC 53 ms
23,704 KB
testcase_10 AC 56 ms
24,312 KB
testcase_11 AC 54 ms
23,988 KB
testcase_12 AC 58 ms
23,796 KB
testcase_13 AC 57 ms
23,952 KB
testcase_14 AC 58 ms
23,500 KB
testcase_15 AC 56 ms
24,000 KB
testcase_16 AC 57 ms
23,892 KB
testcase_17 AC 58 ms
23,496 KB
testcase_18 AC 57 ms
24,276 KB
testcase_19 AC 55 ms
23,940 KB
testcase_20 AC 55 ms
23,976 KB
testcase_21 AC 53 ms
23,664 KB
testcase_22 AC 55 ms
24,240 KB
testcase_23 AC 56 ms
23,784 KB
testcase_24 AC 55 ms
23,796 KB
testcase_25 AC 57 ms
24,000 KB
testcase_26 AC 56 ms
23,964 KB
testcase_27 AC 56 ms
23,668 KB
testcase_28 AC 57 ms
23,408 KB
testcase_29 AC 57 ms
23,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
x=0
f = (N-1)%(K+1)==0
while x<N:
    if f:
        print(0,flush=True)
        f=False
    elif N-1-x<=K:
        print(N-1,flush=True)
    else:
        d = (N-1-x)%(K+1)
        if d==0:d=K
        print(x+d, flush=True)
    x = int(input())
0