https://www.acmicpc.net/problem/20254
문제
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
- $U_R$ be the number of universities solving at least one problem in the regional contest.
- $T_R$ be the number of teams solving at least one problem in the regional contest.
- $U_O$ be the number of universities solving at least one problem in TOPC.
- $T_O$ be the number of teams solving at least one problem in TOPC.
The site score of 2020 Taipei-Hsinchu regional contest will be $56U_R + 24T_R + 14U_O + 6T_O$. 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 $U_R$, $T_R$, $U_O$, and $T_O$.
출력
Output the site score of the 2020 Taipei-Hsinchu regional contest.
제한
- 0 < $U_R$ ≤ $T_R$ ≤ 120
- 0 < $U_O$ ≤ $T_O$ ≤ 1000
예제 입력 1
1 1 1 1
예제 출력 1
100
예제 입력 2
1 10 100 1000
예제 출력 2
7696
# U_R, T_R, U_O, T_O가 순서대로 주어질 때,
# 56U_R + 24T_R + 14U_O + 6T_0를 구하여라
U_R, T_R, U_O, T_O = map(int, input().split())
print(56 * U_R + 24 * T_R + 14 * U_O + 6 * T_O)
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 21300] Bottle Return (python) (0) | 2021.11.28 |
---|---|
[백준, BOJ 20492] 세금 (python) (0) | 2021.11.28 |
[백준, BOJ 18301] Rats (python) (0) | 2021.11.28 |
[백준, BOJ 1966] 프린터 큐 (python) (0) | 2021.11.27 |
[백준, BOJ 1920] 수 찾기 (python) (0) | 2021.11.27 |