Silver Library (Archived)
Baekjoon algorithm - 1008, python 본문
반응형
1008번: A/B
두 정수 A와 B를 입력받은 다음, A/B를 출력하는 프로그램을 작성하시오.
www.acmicpc.net
Solution 1
a,b = input().split()
a = float(a)
b = float(b)
print(a/b)
Solution 2
a,b = input().split()
a = int(a)
b = int(b)
print(a/b)
Note:
I thought solution 2 would be wrong, but this is the correct one too.
Note 2:
Guess I need some practice to explain how I could solve this (like the link below?)
gabii.tistory.com/entry/BaekJoonPython3-%EB%B0%B1%EC%A4%80-1008%EB%B2%88-AB
[BaekJoon/Python3] 백준 1008번 A/B
이번 포스팅은 백준 알고리즘 사이트의 1008번 A/B 문제를 Python 언어로 코딩해보도록 하겠습니다. 아래 url로 접속하시면 문제를 볼 수 있습니다. https://www.acmicpc.net/problem/1008 지난 백준 알고리즘
gabii.tistory.com
'F2. Problem & Solving > Solving' 카테고리의 다른 글
Plan of learning the algorithm (0) | 2021.05.01 |
---|---|
Baekjoon algorithm - 10430 , python (map) (0) | 2021.02.15 |
baekjoon algorithm - 10869 (0) | 2021.02.15 |
Baekjoon - problem 1001, Python (0) | 2021.02.15 |
[Notion] RDB, RDBMS? (0) | 2020.11.25 |