Submission #62914


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
def isprime(n):
if n == 1:
return False
for i in range(2, int(n**0.5)+1):
if n % i == 0:
return False
return True
N, *d = map(int, open(0).read().split())
for i in range(N):
targ = d[i]
if targ == 1:
print("2")
elif isprime(targ):
print("1")
else:
print("NA")

ステータス

項目 データ
問題 1304 - 掛けても素数!?
ユーザー名 shobonvip
投稿日時 2020-08-24 17:01:40
言語 Python3
状態 Time Limit Exceeded
得点 0
ソースコード長 298 Byte
最大実行時間 1000 ms
最大メモリ使用量 131072 KB

セット

セット 得点 Cases
1 ALL 0 / 3 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 40 ms 3488 KB
1
in02.txt AC 36 ms 3476 KB
1
in03.txt AC 32 ms 3192 KB
1
in04.txt AC 39 ms 3328 KB
1
in05.txt AC 43 ms 3312 KB
1
in06.txt TLE 1000 ms 23464 KB
1
in07.txt TLE 1000 ms 118252 KB
1
in08.txt TLE 1000 ms 107020 KB
1
in09.txt TLE 1000 ms 114316 KB
1
in10.txt MLE 1000 ms 131072 KB
1
in11.txt MLE 1000 ms 131072 KB
1
in12.txt MLE 1000 ms 131072 KB
1
in13.txt MLE 1000 ms 131072 KB
1
in14.txt MLE 1000 ms 131072 KB
1
in15.txt TLE 1000 ms 130224 KB
1
in16.txt TLE 1000 ms 67096 KB
1
in17.txt MLE 1000 ms 131072 KB
1
in18.txt TLE 1000 ms 130328 KB
1
in19.txt MLE 1000 ms 131072 KB
1
in20.txt TLE 1000 ms 129420 KB
1
in21.txt AC 906 ms 40288 KB
1
in22.txt TLE 1000 ms 42200 KB
1
in23.txt MLE 1000 ms 131072 KB
1
in24.txt AC 40 ms 23272 KB
1
in25.txt AC 38 ms 23276 KB
1
in26.txt AC 36 ms 23148 KB
1
sample01.txt AC 29 ms 23148 KB
1