結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー Nagisa
提出日時 2015-10-17 22:34:51
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 385 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 27,624 KB
平均クエリ数 3.70
最終ジャッジ日時 2024-07-16 21:42:20
合計ジャッジ時間 4,092 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = list(map(int, input().split()))
d = (N-1) % (K+1)
m = 1
if d == 0:
    print(0)
    while True:
        p = int(input())
        if p >= N:
            break
        else:
            print((K+1)*m)
            m += 1
else:
    print(d)
    while True:
        p = int(input())
        if p >= N:
            break
        else:
            print(d + (K+1)*m)
            m += 1
0