QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 64 MB

#23573. 3 個のサイコロ

统计

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 個のサイコロの出た目が与えられたとき、賞金を計算するプログラムを作成してください。

入力

1 行目に 3 個の目が空白区切りで与えられます。

出力

1 行目にゲームの賞金を出力してください。

入出力例

入力 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.