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 |
Tags
- 자연어처리
- PYTHON
- 편스토랑 우승상품
- 데이콘
- 금융문자분석경진대회
- Real or Not? NLP with Disaster Tweets
- 우분투
- 파이썬
- 코로나19
- Kaggle
- Baekjoon
- Docker
- SW Expert Academy
- 프로그래머스 파이썬
- programmers
- dacon
- 더현대서울 맛집
- 프로그래머스
- ubuntu
- 맥북
- hackerrank
- AI 경진대회
- 백준
- 캐치카페
- leetcode
- github
- gs25
- ChatGPT
- Git
- 편스토랑
Archives
- Today
- Total
솜씨좋은장씨
[BaekJoon] 15792번 : A/B - 2 (Python) 본문
728x90
반응형
코딩 1일 1문제! 오늘의 문제는 백준의 악마의 연차 계산기 입니다.
👨🏻💻 코드 ( Solution )
def a_b_2(A, B):
answer = str(A // B)
if A % B != 0:
answer += "."
idx = 0
while A % B != 0 and idx < 1000:
A = A % B * 10
idx += 1
answer += str(A // B)
return answer
if __name__ == "__main__":
A, B = map(int, input().split())
print(a_b_2(A, B))
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
[BaekJoon] 6778번 : Which Alien? (Python) (0) | 2022.08.23 |
---|---|
[BaekJoon] 11784번 : Hex Code (Python) (0) | 2022.08.22 |
[BaekJoon] 17202번 : 핸드폰 번호 궁합 (Python) (0) | 2022.08.20 |
[BaekJoon] 4969번 : St. Ives (Python) (0) | 2022.08.18 |
[BaekJoon] 24416번 : 알고리즘 수업 - 피보나치 수 1 (Python) (0) | 2022.08.16 |
Comments