QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 2048 MB 満点: 100

#9068. 三个七

統計

Eddy 正在监督一些新型老虎机的制造。他的老虎机由三个转轮组成,每个转轮可以显示若干个不同数字中的一个。当启动时,每个转轮会随机显示一个数字。目标是让所有转轮都能显示数字 7。

如果每个转轮都能显示数字 7,则称该老虎机是好的,否则是坏的。对于给定的老虎机,请判断它是好的还是坏的。

输入格式

第一行包含一个整数 $n$ ($1 \le n \le 10$),表示每个转轮上不同数字的数量。每个转轮上的数字数量相同。

接下来的三行,每行包含 $n$ 个不同的数字(范围在 0 到 9 之间)。这些分别是三个转轮上显示的数字。

输出格式

输出一个整数,如果老虎机是好的,输出 777,否则输出 0。

样例

样例输入 1

2
0 7
7 3
7 0

样例输出 1

777

样例输入 2

2
0 7
7 3
3 9

样例输出 2

0

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.