QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 1024 MB مجموع النقاط: 100

#4964. 易于求解的表达式

الإحصائيات

当人们看到一组数字时,通常会好奇它们之间是否存在某种关系?如果只有三个数字,这个问题就更容易处理了。

给定三个不同的正整数,你需要确定其中一个数是否可以通过另外两个数计算得出。如果这三个数中任意一个数是另外两个数的和,则输出 1;如果任意一个数是另外两个数的积,则输出 2;否则输出 3。假设这三种情况中恰好有一种成立。

输入仅有一行,包含三个不同的正整数,每个数都在 2 到 1000 之间(含 2 和 1000)。

输出上述对应的数字。

样例

输入格式 1

10 30 20

输出格式 1

1

输入格式 2

10 20 200

输出格式 2

2

输入格式 3

100 5 700

输出格式 3

3

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.