[プログラマー]無傷の矩形
📖 質問する
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))
Reference
この問題について([プログラマー]無傷の矩形), 我々は、より多くの情報をここで見つけました https://velog.io/@swbest99/프로그래머스-멀쩡한-사각형テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol