結果

問題 No.2721 "Don't say N" Game
ユーザー ゼットゼット
提出日時 2024-04-12 21:23:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 234 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 82,104 KB
実行使用メモリ 68,100 KB
最終ジャッジ日時 2024-04-12 21:23:20
合計ジャッジ時間 1,252 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,948 KB
testcase_01 AC 83 ms
67,328 KB
testcase_02 AC 71 ms
67,384 KB
testcase_03 AC 84 ms
66,936 KB
testcase_04 AC 66 ms
67,280 KB
testcase_05 AC 77 ms
68,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())
for _ in range(Q):
  N=int(input())
  ans=1
  for x in range(2,N+1):
    if N%x==0:
      count=0
      while N%x==0:
        N/=x
        count+=1
      ans*=count+1
  if ans%2==1:
    print('P')
  else:
    print('K')
0