C. 练61.2 掷骰子

    Type: Default 1000ms 64MiB

练61.2 掷骰子

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

Bessie loves playing Board Role-Playing Games (BRPG), so she convinced Farmer John to drive her to the store where she bought three dice.
These three dice have S1S_1, S2S_2, and S3S_3 faces respectively. Each die with SS faces has numbers from 11 to SS on its faces.
Bessie throws all three dice at once, and she keeps throwing them to find out which sum of the three dice appears most frequently.
Given the number of faces on each of the three dice, determine which sum appears most frequently. If there are multiple solutions, output the smallest one.
Data range: (2S1202 \le S_1 \le 20; 2S2202 \le S_2 \le 20; 2S3402 \le S_3 \le 40).

Input Format

First line: Three positive integers S1S_1, S2S_2, S3S_3.

Output Format

A single integer representing the most frequently occurring sum.

Sample

3 2 3
5

20250920C班作业(2)

Not Claimed
Status
Done
Problem
4
Open Since
2025-9-20 0:00
Deadline
2025-10-11 23:59
Extension
24 hour(s)