본문 바로가기
공부/코딩테스트

백준: 20254번 Site Score (Python3)

by 혼밥맨 2022. 7. 30.
반응형

백준: 20254번 Site Score (Python3)

Site Score 성공다국어

 
시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB 2693 2448 2348 91.078%

문제

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.

다양한 대학의 팀이 ICPC 세계 결승전 티켓을 놓고 ICPC 지역 대회에서 경쟁합니다. 모든 지역 대회에 할당된 티켓의 수는 다를 수 있습니다. 슈퍼 지역인 아시아 태평양 지역의 할당 방법은 사이트 점수라는 매개변수를 기반으로 합니다.

사이트 점수는 지역 대회 또는 예비 대회 TOPC에서 하나 이상의 문제를 해결한 팀과 대학만 계산합니다. 2020년에는 타이페이-신주 지역 대회의 사이트 점수를 계산하는 공식이 과거보다 훨씬 간단해졌습니다. 허락하다

UR은 지역 대회에서 하나 이상의 문제를 해결한 대학의 수입니다.
TR은 지역 대회에서 하나 이상의 문제를 해결한 팀의 수입니다.
UO는 TOPC에서 하나 이상의 문제를 해결한 대학의 수입니다.
TO는 TOPC에서 적어도 하나의 문제를 해결하는 팀의 수입니다.
2020 타이베이-신주 지역 대회의 사이트 점수는 56UR + 24TR + 14UO + 6TO입니다. 2020 Taipei-Hsinchu 지역 대회의 사이트 점수를 계산하는 프로그램을 작성하세요.

입력

The input has only one line containing four blank-separated positive integers UR, TR, UO, and TO.

입력에는 공백으로 구분된 4개의 양의 정수 UR, TR, UO 및 TO가 포함된 한 줄만 있습니다.

출력

Output the site score of the 2020 Taipei-Hsinchu regional contest.

2020년 타이페이-신주 지역 대회의 사이트 점수를 출력합니다.

제한

  • 0 < UR ≤ TR ≤ 120
  • 0 < UO ≤ TO ≤ 1000

예제 입력 1

1 1 1 1

예제 출력 1

100

예제 입력 2

1 10 100 1000

예제 출력 2

7696

답안

1
2
a, b, c, d = map(int, input().split())
print(56*a+24*b+14*c+6*d)
cs

반응형

댓글