結果

問題 No.2725 Coprime Game 2
ユーザー 👑 p-adicp-adic
提出日時 2023-10-04 18:18:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 348 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 87,004 KB
実行使用メモリ 78,684 KB
最終ジャッジ日時 2023-10-06 00:10:34
合計ジャッジ時間 3,250 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,400 KB
testcase_01 AC 72 ms
71,356 KB
testcase_02 AC 73 ms
71,308 KB
testcase_03 AC 300 ms
77,628 KB
testcase_04 AC 325 ms
78,244 KB
testcase_05 AC 348 ms
78,684 KB
testcase_06 AC 322 ms
77,868 KB
testcase_07 AC 245 ms
78,092 KB
testcase_08 AC 304 ms
78,020 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

R=range
P=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53]
for t in R(int(input())):
	N,i=int(input()),0
	while N%P[i]<1:i+=1
	b=N<3
	for j in R(2,P[i]):
		if N%j:b=1
	print("KP"[b])
0