-
[준비운동 PART1. 튼튼한 기본기] 소수 찾기(1978번)🧠𝗔𝗹𝗴𝗼𝗿𝗶𝘁𝗵𝗺/💛 백준 2021. 7. 2. 11:20
1. 문제 설명
https://www.acmicpc.net/problem/1978
2. 나의 풀이
n = int(input()) nums = list(map(int, input().split())) count = 0 def isPrime(n): if n <= 1: return False for i in range(2, n-1): if n%i == 0: return False return True for num in nums: if isPrime(num): count += 1 print(count)
'🧠𝗔𝗹𝗴𝗼𝗿𝗶𝘁𝗵𝗺 > 💛 백준' 카테고리의 다른 글
[최고빈출 DFS, BFS 기본문제] DFS와 BFS(1260번) (0) 2021.07.02 [준비운동 PART1. 튼튼한 기본기] 쉽게 푸는 문제 (1292번) (0) 2021.07.02 [준비운동 PART1. 튼튼한 기본기] 소수(2581번) (0) 2021.07.02 [준비운동 PART1. 튼튼한 기본기] 최대공약수와 최소공배수(2609번) (0) 2021.07.01 [준비운동 PART1. 튼튼한 기본기] 일곱난쟁이(2309번) (0) 2021.07.01