반응형
Notice
Recent Posts
Recent Comments
Link
«   2024/06   »
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
Archives
Today
Total
06-30 00:00
관리 메뉴

ImJay

[파이썬/Python] 백준 20254번 Site Score 본문

Solved.ac - Python/Bronze V

[파이썬/Python] 백준 20254번 Site Score

ImJay 2022. 11. 28. 12:16
반응형

[파이썬/Python] 백준 20254번 Site Score

 

20254번: Site Score

Teams from variaous universities compete in ICPC regional contests for tickets to the ICPC World Finals. The number of tickets allocated to every regional contest may be different. The allocation method in our super region, Asia Pacific, is based on a para

www.acmicpc.net


문제

Teams from variaous universities compete in ICPC regional contests for tickets to the ICPC World Finals. The number of tickets allocated to every regional contest may be different. The allocation method in our super region, Asia Pacific, is based on a parameter called site score.

Site scores will only count teams and universities solving at least one problem, in the regional contest or its preliminary contest TOPC. In 2020, the formula for calculating the site score of the Taipei-Hsinchu regional contest is much simpler than past years. Let

  • UR be the number of universities solving at least one problem in the regional contest.
  • TR be the number of teams solving at least one problem in the regional contest.
  • UO be the number of universities solving at least one problem in TOPC.
  • TO be the number of teams solving at least one problem in TOPC.

The site score of 2020 Taipei-Hsinchu regional contest will be 56UR + 24TR + 14UO + 6TO. Please write a program to compute the site score of the 2020 Taipei-Hsinchu regional contest.

해석

The site score of 2020 Taipei-Hsinchu regional contest will be 56UR + 24TR + 14UO + 6TO. 

점수는 56UR + 24TR + 14UO + 6TO 이다.

코드

UR, TR, UO, TO = map(int, input().split())

print(56*UR + 24*TR + 14*UO + 6*TO)

풀이

1. UR, TR, UO, TO 를 입력 받는다.

UR, TR, UO, TO = map(int, input().split())

 

2. 점수 (56UR + 24TR + 14UO + 6TO) 를 출력한다.

print(56*UR + 24*TR + 14*UO + 6*TO)

 

반응형
Comments