문제
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 input has only one line containing four blank-separated positive integers UR, TR, UO, and TO.
출력
Output the site score of the 2020 Taipei-Hsinchu regional contest.
제한
- 0 < UR ≤ TR ≤ 120
- 0 < UO ≤ TO ≤ 1000
풀이
Ur, Tr, Uo, To = map(int,input().split())
print(56*Ur + 24*Tr + 14*Uo + 6*To)
'Develop > 알고리즘' 카테고리의 다른 글
[백준/Python] Silver II #1138 한 줄로 서기 (0) | 2023.08.18 |
---|---|
[백준/Python] Bronze V #21300 Bottle Return (0) | 2023.08.18 |
[백준/Python] Silver IV #1244 스위치 켜고 끄기 (0) | 2023.08.17 |
[백준/Python] Bronze I #9933 민균이의 비밀번호 (0) | 2023.08.17 |
[백준/Python] Bronze I #11005 진법 변환 2 (0) | 2023.08.17 |
Comment