일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Sequential Search
- markdown
- almostIncreasingSequence
- All Longest Strings
- flask
- 피보나치 수
- adjacentElementsProduct
- 10953
- 2015 봄학기 알고리즘
- recursion
- centuryFromYear
- 파이썬 포렌식
- 백준
- 파이썬머신러닝완벽가이드
- baekjun
- cpp
- til
- collections.deque
- 2750
- Daily Commit
- C++
- Counting cells in a blob
- Python
- matrixElementsSum
- Numpy
- codesignal
- data_structure
- 수 정렬하기
- codesingal
- shapeArea
Archives
- Today
- Total
Introfor
[백준] 1978번 소수 찾기 본문
소수는 약수로 1과 자기 자신만 가지는 수를 의미.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
def solution():
int(input())
nums = list(map(int, input().split()))
res = 0
for i in nums:
cnt = 0
for j in range(1, i+1):
if not i % j:
cnt += 1
if cnt == 2:
res += 1
return res
res = solution()
print(res)
|
cs |
'Programming_prob > BaekJoon' 카테고리의 다른 글
[백준] 2525번 오븐 시계 (0) | 2020.10.19 |
---|---|
[백준] 2480번 주사위 세개 (0) | 2020.10.18 |
[백준] 2839번 설탕 배달 (0) | 2020.10.09 |
[백준] 1712번 손익분기점 (0) | 2020.10.08 |
[백준] 1316번 그룹 단어 체커 (0) | 2020.10.07 |
Comments