지나가던 개발자
[Python] 백준 14490번(백대열) 문제 풀이 본문
import math
n, m = map(int, input().split(":"))
print(str(n//math.gcd(n, m))+":"+str(m//math.gcd(n, m)))
'PS > Python' 카테고리의 다른 글
[Python] 백준 5637번(가장 긴 단어) 문제 풀이 (0) | 2022.11.12 |
---|---|
[Python] 17176번(암호해독기) 문제 풀이 (0) | 2022.11.11 |
[Python] 백준 5426번(비밀 편지) 문제 풀이 (0) | 2022.11.10 |
[Python] 백준 14584번(암호 해독) 문제 풀이 (0) | 2022.11.09 |
[Python] 백준 25325번(학생 인기도 측정) 문제 풀이 (0) | 2022.11.08 |
Comments