728x90
반응형
단순 수학 문제이다.
N, M = map(int, input().split())
li = list(map(int, input().split()))
res = 0
for i in range(1, N+1):
for n in li:
if i%n == 0:
res += i
break
print(res)
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 11319번 Count Me In(python) (0) | 2021.03.25 |
---|---|
백준 알고리즘 11104번 Fridge of Your Dreams(python) (0) | 2021.03.25 |
백준 알고리즘 4999번 아!(python) (0) | 2021.03.25 |
백준 알고리즘 15947번 아기 석환 뚜루루 뚜루(python) (0) | 2021.03.25 |
백준 알고리즘 14624번 전북대학교(python) (0) | 2021.03.25 |