Algorithm/PS

[BOJ/백준] 9317 - Monitor DPI [python]

2023. 3. 24. 20:32
목차
  1. 문제 풀이
  2. 정답 코드
728x90

문제 링크

 

9317번: Monitor DPI

Each input line will have 3 numbers, the decimal value D, the integer value \(\text{Resolution}_{\text{Horizontal}}\), and the integer value \(\text{Resolution}_{\text{Vertical}}\). An input line of three zeroes will signify end of input

www.acmicpc.net

문제 풀이

입력값을 받고, 문제에 나오는 공식을 적용해 출력해주면 된다.

정답 코드

while True :
    D, RH, RV = map(float, input().split())
    if D == RH == RV == 0 : break
    W = 16 * D / (337 ** 0.5)
    H = 9 * W / 16
    print("Horizontal DPI: {:.2f}".format(RH / W))
    print("Vertical DPI: {:.2f}".format(RV / H))
728x90

'Algorithm > PS' 카테고리의 다른 글

[BOJ/백준] 9366 - 삼각형 분류 [python]  (0) 2023.03.24
[BOJ/백준] 9325 - 얼마? [python]  (0) 2023.03.24
[BOJ/백준] 9310 - Arithmetic and Geometric Sums [python]  (0) 2023.03.24
[BOJ/백준] 9306 - Practice: Roll Call [python]  (0) 2023.03.24
[BOJ/백준] 9299 - Math Tutoring [python]  (0) 2023.03.24
  1. 문제 풀이
  2. 정답 코드
'Algorithm/PS' 카테고리의 다른 글
  • [BOJ/백준] 9366 - 삼각형 분류 [python]
  • [BOJ/백준] 9325 - 얼마? [python]
  • [BOJ/백준] 9310 - Arithmetic and Geometric Sums [python]
  • [BOJ/백준] 9306 - Practice: Roll Call [python]
chanwoong1
chanwoong1
안녕하세요.
250x250
chanwoong1
WOONGTECH
chanwoong1
전체
오늘
어제
  • 분류 전체보기 (231)
    • 42SEOUL (28)
      • Circle0 (1)
      • Circle1 (3)
      • Circle2 (3)
      • Circle3 (2)
      • Circle4 (7)
      • Circle5 (8)
      • Circle6 (4)
    • Algorithm (163)
      • PS (159)
      • Study (4)
    • Blog (5)
    • 우테코 프리코스 (5)
    • Data Science (1)
    • WEB (27)
      • React (18)
      • Recoil (2)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

인기 글

최근 댓글

최근 글

hELLO · Designed By 정상우.
chanwoong1
[BOJ/백준] 9317 - Monitor DPI [python]
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.