結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー convexineqconvexineq
提出日時 2021-02-04 10:09:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 87,116 KB
実行使用メモリ 87,572 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-24 02:51:13
合計ジャッジ時間 4,926 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
87,328 KB
testcase_01 AC 103 ms
87,232 KB
testcase_02 AC 99 ms
87,232 KB
testcase_03 AC 100 ms
86,964 KB
testcase_04 AC 97 ms
87,252 KB
testcase_05 AC 97 ms
87,396 KB
testcase_06 AC 98 ms
87,252 KB
testcase_07 AC 100 ms
87,420 KB
testcase_08 AC 99 ms
87,408 KB
testcase_09 AC 97 ms
87,164 KB
testcase_10 AC 98 ms
87,212 KB
testcase_11 AC 98 ms
86,976 KB
testcase_12 AC 105 ms
87,268 KB
testcase_13 AC 100 ms
87,072 KB
testcase_14 AC 97 ms
86,708 KB
testcase_15 AC 104 ms
86,740 KB
testcase_16 AC 105 ms
87,388 KB
testcase_17 AC 103 ms
87,256 KB
testcase_18 AC 100 ms
86,916 KB
testcase_19 AC 98 ms
86,896 KB
testcase_20 AC 99 ms
87,104 KB
testcase_21 AC 97 ms
87,548 KB
testcase_22 AC 103 ms
87,008 KB
testcase_23 AC 101 ms
87,040 KB
testcase_24 AC 97 ms
87,356 KB
testcase_25 AC 97 ms
87,400 KB
testcase_26 AC 97 ms
87,144 KB
testcase_27 AC 95 ms
87,144 KB
testcase_28 AC 98 ms
86,832 KB
testcase_29 AC 98 ms
87,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def say(x):
    print(x)
    sys.stdout.flush()

import sys
n,k = map(int,input().split())
say((n-1)%(k+1))
while True:
    x = int(input())
    if x >= n: exit()
    r = (n-1-x)%(k+1)
    v = x + (r if r else k)
    say(v)
0