Skip to content

Commit a6b7916

Browse files
authored
#2 1978_소수 찾기
1 parent 4955a35 commit a6b7916

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

이티예원/1978_소수 찾기.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import sys
2+
3+
n = int(input())
4+
print(n)
5+
m = [*map(int,sys.stdin.readline().split())]
6+
print(m)
7+
count = 0
8+
9+
for i in m:
10+
if i != 1 and i != 2:
11+
for a in range(i):
12+
if a != 0 and a != 1:
13+
if i % a == 0:
14+
break
15+
elif a == i-1:
16+
count += 1
17+
break
18+
else:
19+
count += 1
20+
elif i == 2:
21+
count += 1
22+
23+
print(count)

0 commit comments

Comments
 (0)