結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー parukiparuki
提出日時 2016-12-23 21:05:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 261 bytes
コンパイル時間 125 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 24,528 KB
平均クエリ数 3.73
最終ジャッジ日時 2023-09-23 12:19:36
合計ジャッジ時間 3,457 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 52 ms
24,384 KB
testcase_02 AC 53 ms
24,420 KB
testcase_03 AC 53 ms
23,904 KB
testcase_04 WA -
testcase_05 AC 52 ms
24,360 KB
testcase_06 AC 51 ms
24,384 KB
testcase_07 AC 52 ms
24,444 KB
testcase_08 AC 52 ms
23,532 KB
testcase_09 AC 54 ms
24,288 KB
testcase_10 AC 54 ms
23,528 KB
testcase_11 AC 53 ms
24,084 KB
testcase_12 AC 54 ms
23,572 KB
testcase_13 AC 53 ms
24,060 KB
testcase_14 AC 53 ms
24,048 KB
testcase_15 AC 53 ms
23,700 KB
testcase_16 WA -
testcase_17 AC 54 ms
24,528 KB
testcase_18 AC 54 ms
23,540 KB
testcase_19 WA -
testcase_20 AC 54 ms
24,396 KB
testcase_21 AC 50 ms
23,688 KB
testcase_22 AC 52 ms
23,664 KB
testcase_23 AC 52 ms
23,412 KB
testcase_24 AC 51 ms
24,384 KB
testcase_25 AC 52 ms
24,072 KB
testcase_26 AC 53 ms
24,108 KB
testcase_27 AC 52 ms
24,336 KB
testcase_28 AC 56 ms
24,372 KB
testcase_29 AC 52 ms
23,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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