Python math.gcd()

사용 버전: Python 3.7.9

파이썬 math.gcd()를 알아보겠습니다.


gcd는 최대공약수를 구할 때 사용합니다. 괄호 안에는 최대공약수를 구하고 싶은 두 수를 집어넣습니다.





4와 5의 최대공약수는 1입니다.

50과 70의 최대공약수는 10입니다.



끝.


카테고리: Python, python_math


댓글

이 블로그의 인기 게시물

Python urllib.parse.quote()

KiCad 시작하기 4 (기존 회로도 수정 및 추가)

Android Compose Coil library

KiCad 시작하기 1 (회로도 만들기)

Forensics .pyc 파일 .py로 복구하기

Android Notification with Full Screen

iOS Swift callAsFunction

iOS Error Undefined symbol Testing.Trait

황전 휴게소(순천 방향) 추천 메뉴

Android Compose automation for getting localized images to use on Play Store app image