반응형
https://www.acmicpc.net/problem/1977
# @Author YoungMinKim
# baekjoon
M=int(input())
N=int(input())
tmp=[]
for i in range(M,N+1):
if str(i**(1/2))[-1] == '0' :
tmp.append(i)
else:
continue
if len(tmp) == 0:
print(-1)
else:
print(sum(tmp))
print(min(tmp))
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 2420 (0) | 2020.08.24 |
---|---|
baekjoon - python - 2163 (0) | 2020.08.24 |
baekjoon - python - 1934 (0) | 2020.08.24 |
baekjoon - python - 1924 (0) | 2020.08.21 |
baekjoon - python - 1712 (0) | 2020.08.21 |
댓글