結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー jitomeskyjitomesky
提出日時 2015-08-01 16:36:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 300 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 24,456 KB
平均クエリ数 4.23
最終ジャッジ日時 2023-09-23 05:26:28
合計ジャッジ時間 3,758 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 65 ms
24,288 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 60 ms
24,036 KB
testcase_11 AC 64 ms
24,300 KB
testcase_12 AC 61 ms
23,688 KB
testcase_13 AC 62 ms
23,676 KB
testcase_14 RE -
testcase_15 AC 59 ms
23,568 KB
testcase_16 AC 59 ms
23,664 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 59 ms
23,880 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 AC 61 ms
23,568 KB
testcase_23 AC 60 ms
24,288 KB
testcase_24 AC 60 ms
24,288 KB
testcase_25 AC 58 ms
24,300 KB
testcase_26 RE -
testcase_27 AC 59 ms
23,972 KB
testcase_28 AC 60 ms
23,896 KB
testcase_29 RE -
権限があれば一括ダウンロードができます

ソースコード

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 - K):
        break
print_num(N - 1)
input()
0