QOJ.ac

QOJ

时间限制: 0.2 s 内存限制: 1024 MB 总分: 100

#4958. 拦截信息

统计

Spies Breaching Computers (SBC) 是一家私人数字间谍机构,正在开发一种利用电磁波拦截信息的新设备,这使得即使在没有与目标进行物理接触的情况下也能进行监视。

该设备尝试一次收集一个字节的信息,即一个由 8 位组成的序列,其中每一位自然可以取值为 0 或 1。在某些情况下,由于其他设备的干扰,读取无法成功完成。在这种情况下,设备会为相应的位返回数值 9,表示读取无法执行。

为了自动识别设备读取的信息,我们需要编写一个程序,根据设备读取的信息,判断所有位是否都已成功读取。你的任务就是编写这个程序。

输入格式

输入包含一行,包含 8 个整数 $N_1, N_2, N_3, N_4, N_5, N_6, N_7, N_8$,表示设备读取的值(对于 $1 \le i \le 8$,有 $N_i$ 为 0、1 或 9)。

输出格式

如果所有位都成功读取,则打印一行包含大写字母“S”;否则,打印一行包含大写字母“F”,表示失败。

样例

输入格式 1

0 0 1 1 0 1 0 1

输出格式 1

S

输入格式 2

0 0 1 9 0 1 0 1

输出格式 2

F

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.