結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 51 ms
23,552 KB
testcase_02 AC 52 ms
23,952 KB
testcase_03 AC 52 ms
23,316 KB
testcase_04 WA -
testcase_05 AC 53 ms
24,300 KB
testcase_06 AC 51 ms
24,216 KB
testcase_07 AC 52 ms
23,728 KB
testcase_08 AC 52 ms
23,784 KB
testcase_09 AC 53 ms
24,348 KB
testcase_10 AC 53 ms
23,664 KB
testcase_11 AC 50 ms
23,952 KB
testcase_12 AC 51 ms
24,360 KB
testcase_13 AC 54 ms
23,952 KB
testcase_14 AC 54 ms
23,776 KB
testcase_15 AC 53 ms
23,660 KB
testcase_16 WA -
testcase_17 AC 53 ms
23,576 KB
testcase_18 AC 51 ms
23,688 KB
testcase_19 WA -
testcase_20 AC 53 ms
23,396 KB
testcase_21 AC 55 ms
23,328 KB
testcase_22 AC 53 ms
24,252 KB
testcase_23 AC 58 ms
23,464 KB
testcase_24 AC 54 ms
23,592 KB
testcase_25 AC 53 ms
23,964 KB
testcase_26 AC 53 ms
23,488 KB
testcase_27 AC 55 ms
24,300 KB
testcase_28 AC 54 ms
23,772 KB
testcase_29 AC 53 ms
23,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
x=0
while x<N:
    if N==1:
        print(0,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