1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
m = int(input())
n = int(input())
lists = []
for i in range(m, n+1):
check = 0
if i >= 2:
if i == 2:
else:
for j in range(2, i):
if i%j == 0:
check = 1
break
if check == 0:
if len(lists) >= 1:
print(sum(lists))
print(min(lists))
else:
print(-1)
|
'Algorithm > BOJ 기초' 카테고리의 다른 글
[백준] 10773 제로 Python C++ (0) | 2019.10.08 |
---|---|
[백준] 11047 동전0 Python C++ (0) | 2019.10.08 |
[백준] 소수찾기 1978 Python C++ (0) | 2019.10.08 |
[백준] 2921 도미노 Python (0) | 2019.10.08 |
[백준] 주사위 세개 2480 Python C++ (0) | 2019.10.04 |