Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Forensics
- N0Named
- Incognito
- Text
- 문자열
- Web
- php
- 인코그니토
- xcz.kr
- C
- 백준
- Web Hacking
- MySQL
- cryptography
- misc
- SuNiNaTas
- Digital Forensics
- 구현
- CTF
- 사칙연산
- Python
- 정렬
- Database
- 그리디 알고리즘
- HackCTF
- wargame
- 수학
- writeup
- Network
- 써니나타스
Archives
- Today
- Total
보안을 그리다, 훈이
[Baekjoon/Python3] 14490번 백대열 본문
[Baekjoon/Python3] 14490번 백대열
14490번: 백대열
n과 m이 :을 사이에 두고 주어진다. (1 <= n, m <= 100,000,000)
www.acmicpc.net
def gdc(a, b):
if b % a:
return gdc(b % a, a)
else:
return a
n, m = map(int, input().split(':'))
g = gdc(n, m)
print('{}:{}'.format(n // g, m // g))
'Programming > Python & Data Structures' 카테고리의 다른 글
[Baekjoon/Python3] 14614번 Calculate! (0) | 2020.12.08 |
---|---|
[Baekjoon/Python3] 14581번 팬들에게 둘러싸인 홍준 (0) | 2020.12.07 |
[Baekjoon/Python3] 14489번 치킨 두 마리 (...) (0) | 2020.12.07 |
[Baekjoon/Python3] 14487번 욱제는 효도쟁이야!! (0) | 2020.12.07 |
[Baekjoon/Python3] 14425번 문자열 집합 (0) | 2020.12.07 |
Comments