728x90
26532번: Acres
You have a rectangular field you want to plant with corn. You know the dimensions of the field in yards, and you know that one bag of corn seed will cover 5 acres. Having passed all your elementary math courses you also know that 4840 square yards is equal
www.acmicpc.net
문제 풀이
단순한 사칙연산 문제이다. 입력값이 야드 단위로 주어지고, 야드와 에이커의 너비는 4840 : 1이다. 5에이커 당 옥수수 종자 한 봉지를 쓸 수 있다고 하니, 9에이커일 경우, 2개의 봉지를 사용할 수 있도록 올림을 해준다.
정답 코드
a, b = map(int, input().split())
ac = a * b / 4840
print(int(ac / 5) + 1)
728x90
'Algorithm > PS' 카테고리의 다른 글
[프로그래머스] 개인정보 수집 유효기간 [python] (0) | 2023.03.07 |
---|---|
[BOJ/백준] 26546 - Reverse [python] (0) | 2023.03.06 |
[BOJ/백준] 26531 - Simple Sum [python] (0) | 2023.03.06 |
[BOJ/백준] 13116 - 30번 [C++/python] (0) | 2023.03.04 |
[BOJ/백준] 7595 - Triangles [C++/python] (0) | 2023.03.03 |