QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 256 MB

#23219. Restricción de tráfico por el último dígito

Statistics

Según una restricción de tráfico, un vehículo no puede circular cuando el último dígito de su matrícula coincide con el último dígito de la fecha. Cuenta cuántos de cinco vehículos infringen esta regla.

Por ejemplo, una matrícula que termina en $7$ tiene restringida la circulación los días $7$, $17$ y $27$; una que termina en $0$, los días $10$, $20$ y $30$.

Entrada

La primera línea contiene el último dígito de la fecha. La segunda línea contiene los últimos dígitos de las matrículas de cinco vehículos. Los seis números son enteros entre 0 y 9, ambos inclusive.

Salida

Imprime el número de vehículos que infringen la regla.

Ejemplos

Entrada 1

1
1 2 3 4 5

Salida 1

1

Entrada 2

3
1 2 3 5 3

Salida 2

2

Entrada 3

5
1 3 0 7 4

Salida 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.