結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー jitomeskyjitomesky
提出日時 2015-08-01 16:38:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 494 ms
コンパイル使用メモリ 10,744 KB
実行使用メモリ 24,408 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-23 21:15:23
合計ジャッジ時間 4,027 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
24,084 KB
testcase_01 AC 63 ms
23,500 KB
testcase_02 AC 64 ms
24,060 KB
testcase_03 AC 62 ms
24,276 KB
testcase_04 AC 61 ms
24,060 KB
testcase_05 AC 62 ms
23,876 KB
testcase_06 AC 62 ms
24,408 KB
testcase_07 AC 62 ms
23,880 KB
testcase_08 AC 61 ms
23,620 KB
testcase_09 AC 61 ms
23,868 KB
testcase_10 AC 63 ms
23,572 KB
testcase_11 AC 63 ms
23,856 KB
testcase_12 AC 63 ms
24,060 KB
testcase_13 AC 61 ms
23,664 KB
testcase_14 AC 62 ms
24,084 KB
testcase_15 AC 62 ms
23,820 KB
testcase_16 AC 61 ms
24,072 KB
testcase_17 AC 61 ms
23,940 KB
testcase_18 AC 61 ms
23,460 KB
testcase_19 AC 61 ms
23,448 KB
testcase_20 AC 63 ms
24,288 KB
testcase_21 AC 62 ms
24,384 KB
testcase_22 AC 62 ms
24,324 KB
testcase_23 AC 62 ms
24,372 KB
testcase_24 AC 61 ms
24,084 KB
testcase_25 AC 61 ms
23,724 KB
testcase_26 AC 62 ms
24,372 KB
testcase_27 AC 62 ms
23,748 KB
testcase_28 AC 62 ms
24,060 KB
testcase_29 AC 61 ms
24,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def print_num(num):
   print(num)
   sys.stdout.flush()

nk = input()
nk = nk.split(' ')
N = int(nk[0])
K = int(nk[1])

diff = K + 1
num = (N-1) % diff

while True:
    print_num(num)
    num += diff
    rival = int(input())
    if rival >= N:
        break
0