結果
| 問題 | No.249 N言っちゃダメゲーム (2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-21 05:08:06 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 758 bytes |
| 記録 | |
| コンパイル時間 | 500 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 21,660 KB |
| 最終ジャッジ日時 | 2026-05-29 22:44:53 |
| 合計ジャッジ時間 | 2,297 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 RE * 2 |
ソースコード
#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 = 0
first_move = True
for _ in range(1000):
N, K = map(int, input().split())
if first_move:
if (N-1) % (K-1) == 0:
n += 1
first_move = False
else:
if (N-1) % (K-1) != 0:
n += 1
first_move = True
print(n)
if __name__ == '__main__':
main()