結果

問題 No.2725 Coprime Game 2
ユーザー PNJPNJ
提出日時 2024-04-12 22:06:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 82,344 KB
実行使用メモリ 77,808 KB
最終ジャッジ日時 2024-04-12 22:06:38
合計ジャッジ時間 3,147 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,496 KB
testcase_01 AC 35 ms
53,476 KB
testcase_02 AC 37 ms
53,492 KB
testcase_03 AC 264 ms
76,056 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
  ans = 'P'
  N = int(input())
  if N == 2:
    print(ans)
    continue
  if N % 2:
    ans = 'K'
  else:
    o = N
    e = N
    for i in range(1,N+1):
      if N % (2*i):
        e = 2*i
        break
    for i in range(1,N+1):
      if N % (2*i + 1):
        o = 2*i + 1
        break
    if o < e:
      ans = 'K'
  print(ans)
0