문제
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.
Solved.ac 레벨
브론즈 V
풀이
문제가 외국어이므로 정답 코드 아래에 번역 링크를 첨부하겠다.
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int ur, tr, uo, to;
cin >> ur >> tr >> uo >> to;
int ans = (56 * ur) + (24 * tr) + (14 * uo) + (6 * to);
cout << ans << '\n';
return 0;
}
문제가 영어여서 그렇지 진짜 단순히 곱셈과 덧셈만 하면 되는 문제였다. 브론즈 5 All Solved가 보인다 보여....
'Study (etc) > Problem Solving' 카테고리의 다른 글
[BOJ / C++] 26574번 : Copier (0) | 2022.12.20 |
---|---|
[BOJ / C++] 5341번 : Pyramids (0) | 2022.12.17 |
[BOJ / Python3] 8437번 : Julka (0) | 2022.12.13 |
[BOJ / C++] 18301번 : Rats (0) | 2022.12.12 |
[BOJ / C++] 14652번 : 나는 행복합니다~ (0) | 2022.12.11 |