코딩로그
[백준/BOJ/C++] 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 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.
[Source Code]
#include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
int ur, tr, uo, to;
cin >> ur >> tr >> uo >> to;
cout << 56 * ur + 24 * tr + 14 * uo + 6 * to;
}
[결과 화면]
'YJ > C++' 카테고리의 다른 글
[백준/BOJ/C++] 20299번 3대 측정 (0) | 2021.11.01 |
---|---|
[백준/BOJ/C++] 16171번 나는 친구가 적다 (Small) (0) | 2021.11.01 |
[백준/BOJ/C++] 13420번 사칙연산 (0) | 2021.11.01 |
[백준/BOJ/C++] 10822번 더하기 (0) | 2021.11.01 |
[백준/BOJ/C++] 21866번 추첨을 통해 커피를 받자 (0) | 2021.11.01 |