結果
| 問題 |
No.257 N言っちゃダメゲーム (3)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-21 05:34:00 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 99 ms / 2,000 ms |
| コード長 | 717 bytes |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 28,648 KB |
| 平均クエリ数 | 3.70 |
| 最終ジャッジ日時 | 2024-07-17 02:56:54 |
| 合計ジャッジ時間 | 4,961 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#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()