| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 파이썬머신러닝완벽가이드
- matrixElementsSum
- baekjun
- Numpy
- 파이썬 포렌식
- codesignal
- centuryFromYear
- adjacentElementsProduct
- codesingal
- recursion
- cpp
- almostIncreasingSequence
- Python
- 피보나치 수
- collections.deque
- Counting cells in a blob
- Sequential Search
- C++
- data_structure
- til
- markdown
- All Longest Strings
- Daily Commit
- 2750
- 10953
- shapeArea
- 수 정렬하기
- flask
- 2015 봄학기 알고리즘
- 백준
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