QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 256 MB

#23219. 机动车尾号限行

Statistics

根据一项交通限行规定,当车辆牌照号码的末位数字与日期的末位数字相同时,该车辆不得上路行驶。请统计五辆车中有多少辆违反了这一规定。

例如,牌照号码以 $7$ 结尾的车辆在 $7$ 日、$17$ 日和 $27$ 日限行;以 $0$ 结尾的车辆在 $10$ 日、$20$ 日和 $30$ 日限行。

输入格式

第一行包含日期的末位数字。第二行包含五辆车的牌照号码的末位数字。这六个数都是从 0 到 9 的整数。

输出格式

输出违反限行规定的车辆数量。

样例

输入格式 1

1
1 2 3 4 5

输出格式 1

1

输入格式 2

3
1 2 3 5 3

输出格式 2

2

输入格式 3

5
1 3 0 7 4

输出格式 3

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.