QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 64 MB

#23573. 주사위 세개

Statistics

문제

1에서부터 6까지의 눈을 가진 3개의 주사위를 던져서 다음과 같은 규칙에 따라 상금을 받는 게임이 있다.

규칙(1) 같은 눈이 3개가 나오면 $10,000 + (\text{같은 눈}) \times 1,000$원의 상금을 받게 된다.

규칙(2) 같은 눈이 2개만 나오는 경우에는 $1,000 + (\text{같은 눈}) \times 100$원의 상금을 받게 된다.

규칙(3) 모두 다른 눈이 나오는 경우에는 $(\text{그 중 가장 큰 눈}) \times 100$원의 상금을 받게 된다.

예를 들어, 3개의 눈 3, 3, 6이 주어지면 상금은 $1,000 + 3 \times 100$으로 계산되어 1,300원을 받게 된다.

또 3개의 눈이 2, 2, 2로 주어지면 $10,000 + 2 \times 1,000$ 으로 계산되어 12,000원을 받게 된다.

3개의 눈이 6, 2, 5로 주어지면 그중 가장 큰 값이 6이므로 $6 \times 100$으로 계산되어 600원을 상금으로 받게 된다.

3개 주사위의 나온 눈이 주어질 때, 상금을 계산하는 프로그램을 작성 하시오.

입력

첫 째 줄에 3개의 눈이 빈칸을 사이에 두고 각각 주어진다.

출력

첫째 줄에 게임의 상금을 출력 한다.

입력 예제 1

3 3 6

출력 예제 1

1300

입력 예제 2

2 2 2

출력 예제 2

12000

입력 예제 3

6 2 5

출력 예제 3

600

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.