結果

問題 No.257 N言っちゃダメゲーム (3)
ユーザー tcltktcltk
提出日時 2021-01-21 05:34:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 717 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 10,960 KB
実行使用メモリ 25,828 KB
平均クエリ数 3.70
最終ジャッジ日時 2023-09-24 02:50:38
合計ジャッジ時間 3,832 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
25,208 KB
testcase_01 AC 66 ms
25,728 KB
testcase_02 AC 67 ms
25,588 KB
testcase_03 AC 65 ms
25,212 KB
testcase_04 AC 66 ms
25,220 KB
testcase_05 AC 66 ms
25,040 KB
testcase_06 AC 68 ms
25,260 KB
testcase_07 AC 64 ms
25,108 KB
testcase_08 AC 65 ms
25,360 KB
testcase_09 AC 66 ms
25,436 KB
testcase_10 AC 65 ms
25,828 KB
testcase_11 AC 63 ms
25,768 KB
testcase_12 AC 65 ms
25,384 KB
testcase_13 AC 65 ms
25,400 KB
testcase_14 AC 65 ms
25,184 KB
testcase_15 AC 65 ms
25,696 KB
testcase_16 AC 64 ms
25,212 KB
testcase_17 AC 63 ms
25,092 KB
testcase_18 AC 65 ms
25,556 KB
testcase_19 AC 63 ms
25,016 KB
testcase_20 AC 63 ms
25,116 KB
testcase_21 AC 62 ms
25,748 KB
testcase_22 AC 63 ms
25,636 KB
testcase_23 AC 61 ms
25,300 KB
testcase_24 AC 64 ms
25,208 KB
testcase_25 AC 64 ms
25,012 KB
testcase_26 AC 63 ms
25,692 KB
testcase_27 AC 63 ms
25,676 KB
testcase_28 AC 63 ms
25,388 KB
testcase_29 AC 63 ms
25,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#region Header
#!/usr/bin/env python3
# from typing import *

import sys
import io
import math
import collections
import decimal
import itertools
from queue import PriorityQueue
import bisect
import heapq

def input():
    return sys.stdin.readline()[:-1]

sys.setrecursionlimit(1000000)
#endregion

# _INPUT = """# paste here...
# """
# sys.stdin = io.StringIO(_INPUT)



def main():
    N, K = map(int, input().split())
    if (N-1) % (K+1) == 0:
        a = 0
    else:
        a = (N-1) % (K+1)
    print(a)
    sys.stdout.flush()

    while True:
        n = int(input())
        if n >= N:
            return
        a += K + 1
        print(a)
        sys.stdout.flush()

if __name__ == '__main__':
    main()
0