Algorithm/PS

[BOJ/백준] 9299 - Math Tutoring [python]

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

문제 링크

 

9299번: Math Tutoring

For each case, output the line “Case x:” where x is the case number, on a single line. The output polynomial is to be formatted in the same manner as the input: the first value being the highest polynomial, and the successive values being the coefficie

www.acmicpc.net

문제 풀이

이 문제는 도함수를 구하는 문제이다. 한 줄씩 입력값이 주어질 때, 그 값들에 차수를 곱해주면 된다.

정답 코드

for i in range(1, int(input()) + 1) :
    lst = [*map(int, input().split())]
    print("Case {:d}: {:d}".format(i, lst[0] - 1), end = " ")
    cnt = lst[0]
    for j in lst[1 : -1] :
        print(j * cnt, end = " ")
        cnt -= 1
    print()
728x90

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

[BOJ/백준] 9310 - Arithmetic and Geometric Sums [python]  (0) 2023.03.24
[BOJ/백준] 9306 - Practice: Roll Call [python]  (0) 2023.03.24
[BOJ/백준] 9298 - Ant Entrapment [python]  (0) 2023.03.24
[BOJ/백준] 9297 - Reducing Improper Fractions [python]  (0) 2023.03.24
[BOJ/백준] 9295 - 주사위 [python]  (0) 2023.03.24
  1. 문제 풀이
  2. 정답 코드
'Algorithm/PS' 카테고리의 다른 글
  • [BOJ/백준] 9310 - Arithmetic and Geometric Sums [python]
  • [BOJ/백준] 9306 - Practice: Roll Call [python]
  • [BOJ/백준] 9298 - Ant Entrapment [python]
  • [BOJ/백준] 9297 - Reducing Improper Fractions [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/백준] 9299 - Math Tutoring [python]
상단으로

티스토리툴바

단축키

내 블로그

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

블로그 게시글

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

모든 영역

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

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