Notice
Recent Posts
Recent Comments
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 | 31 |
Tags
- Docker
- PYTHON
- dacon
- 데이콘
- SW Expert Academy
- Baekjoon
- Real or Not? NLP with Disaster Tweets
- github
- hackerrank
- programmers
- leetcode
- 우분투
- 더현대서울 맛집
- 백준
- ChatGPT
- 캐치카페
- AI 경진대회
- 프로그래머스
- 프로그래머스 파이썬
- Git
- 파이썬
- 자연어처리
- 맥북
- ubuntu
- 편스토랑 우승상품
- Kaggle
- 코로나19
- gs25
- 편스토랑
- 금융문자분석경진대회
Archives
- Today
- Total
솜씨좋은장씨
[BaekJoon] 5344번 : GCD (Python) 본문
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 백준의 GCD입니다.
5344번: GCD
The first line of input will be a positive integer, n, indicating the number of problem sets. Each problem set consist of two positive integers, separated by one or more spaces. There are no blank lines in the input.
www.acmicpc.net
👨🏻💻 코드 ( Solution )
def GCD(a, b):
mod = a%b
while mod > 0:
a = b
b = mod
mod = a%b
return b
if __name__ == "__main__":
for _ in range(int(input())):
a, b = map(int, input().split())
print(GCD(a=a, b=b))
GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07
1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.
github.com
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
| [BaekJoon] 10570번 : Favorite Number (Python) (0) | 2023.01.08 |
|---|---|
| [BaekJoon] 26500번 : Absolutely (Python) (0) | 2023.01.07 |
| [BaekJoon] 26768번 : H4x0r (Python) (0) | 2023.01.03 |
| [BaekJoon] 13717번 : 포켓몬 GO (Python) (0) | 2023.01.02 |
| [BaekJoon] 2947번 : 나무 조각 (Python) (0) | 2023.01.01 |
Comments