QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 1024 MB 總分: 100

#3710. 硬币

统计

在 ICPCCamp,人们通常使用面值为 1, 2, 3 的硬币。 Bobo 非常贫穷,他分别只有 $a_1, a_2, a_3$ 枚面值为 1, 2, 3 的硬币。他购买了一件未知价值的商品,且购买过程中无需找零。 该未知商品的价值为正整数。请找出该商品所有可能的价值数量。

输入格式

3 个整数 $a_1, a_2, a_3$ ($0 \le a_1, a_2, a_3 \le 10^9$)。

输出格式

一个整数,表示未知商品可能的价值数量。

样例

输入 1

1 0 1

输出 1

3

输入 2

0 0 0

输出 2

0

说明

在第一个样例中,Bobo 只能在无需找零的情况下购买价值为 1, 3 或 4 的商品。

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.