結果
| 問題 | 
                            No.257 N言っちゃダメゲーム (3)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-01-20 07:10:56 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 288 bytes | 
| コンパイル時間 | 233 ms | 
| コンパイル使用メモリ | 82,304 KB | 
| 実行使用メモリ | 68,864 KB | 
| 平均クエリ数 | 1.97 | 
| 最終ジャッジ日時 | 2024-11-23 14:19:42 | 
| 合計ジャッジ時間 | 5,083 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 WA * 27 | 
ソースコード
n, k = map(int, input().split())
N = n
tot = 0
if (n - 1) % (k + 1) == 0:
    print(0, flush = True)
    a = int(input())
    if a >= N: exit()
    n -= a
while 1:
    x = (n - 1) % (k + 1)
    print(tot + x, flush = True)
    n -= x
    a = int(input())
    if a >= N: exit()
    n -= a