https://school.programmers.co.kr/learn/courses/30/lessons/12953
프로그래머스
SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
import math
from functools import reduce
def lcm(a, b):
return abs(a*b) // math.gcd(a, b)
def solution(arr):
return reduce(lcm, arr)'코딩테스트 > 코딩테스트 문제풀이' 카테고리의 다른 글
| [Python] 백준 <1091-카드 섞기> (0) | 2025.08.28 |
|---|---|
| [Python] 백준 <1043-거짓말> (0) | 2025.08.28 |
| [Python] 백준 <1112-진법 변환> (0) | 2025.08.28 |
| [Python] 프로그래머스 <미로 탈출 명령어> (0) | 2025.08.20 |
| [Python] 프로그래머스 <풍선 터트리기> (0) | 2025.08.15 |