https://programmers.co.kr/learn/courses/30/lessons/62048
def solution(w,h):
m1=max(w, h)
n1=min(w, h)
while n1:
m1, n1=n1, m1%n1
return w*h-(w+h-m1)
내장함수 사용하면
import math
def solution(w,h):
return w*h-(w+h-math.gdc(w,h))