結果

問題 No.2725 Coprime Game 2
ユーザー 👑 p-adicp-adic
提出日時 2023-10-04 18:17:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 799 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2023-10-06 00:10:33
合計ジャッジ時間 4,565 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,976 KB
testcase_01 AC 15 ms
7,896 KB
testcase_02 AC 17 ms
7,788 KB
testcase_03 AC 610 ms
7,916 KB
testcase_04 AC 799 ms
7,948 KB
testcase_05 AC 616 ms
7,952 KB
testcase_06 AC 600 ms
7,856 KB
testcase_07 AC 357 ms
7,856 KB
testcase_08 AC 551 ms
7,824 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