[백준/Python] 2581번 : 소수
문제
https://www.acmicpc.net/problem/2581
풀이
소수를 구하는 함수는 종종 구현할 일이 있는 것 같다.
M = int(input())
N = int(input())
def is_prime(n):
if n <= 1:
return False
for i in range(2, int(n ** 0.5) + 1):
if n % i == 0:
return Fa...
studio-pendant.hashnode.dev1 min read