1 분 소요

1. 문제

[Bronze V] Site Score - 20254

문제 링크

성능 요약

메모리: 30864 KB, 시간: 72 ms

분류

사칙연산(arithmetic), 수학(math)

문제 설명

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.

출처: 백준, https://https://www.acmicpc.net/

2. 해결방법 시간복잡도

  1. 단순 코딩 O(1)

3. 문제 해결 및 코드


  • 주석을 참고하면서 이해를 돕습니다.

4. 알고리즘 및 해설

  1. 각각의 값들을 받은 이후 문제에서 제시한 공식을 사용해서 출력해준다.
    • 문제에서 제시한 공식 The site score of 2020 Taipei-Hsinchu regional contest will be 56UR + 24TR + 14UO + 6TO.