Seqüència de nombres parells


Submit solution

Points: 10
Time limit: 5.0s
Memory limit: 256M

Author:
Problem types
Allowed languages
C#, Go, Java

Escriu un programa que escrigui la seqüència de nombres parells que comença per \(I\) i acaba en \(F\) (ambdós inclosos).

Input Format

L'entrada consisteix en dos nombres enters, \(I\) i \(F\) separats per un espai en blanc.

Constraints

  • \(I < F\)
  • \(I >= 0\)
  • \(F >= 0\)
  • Es pot assumir que el 0 és un nombre parell.

Output Format

S'imprimirà la seqüència de nombres parells que hi ha entre \(I\) i \(F\) (ambdós inclosos) fent servir un espai com a separador.

Sample Input 0

0 10

Sample Output 0

0 2 4 6 8 10

Sample Input 1

0 8

Sample Output 1

0 2 4 6 8

Sample Input 2

0 7

Sample Output 2

0 2 4 6

Sample Input 3

0 9

Sample Output 3

0 2 4 6 8

Sample Input 4

1 9

Sample Output 4

2 4 6 8

Sample Input 5

7 9

Sample Output 5

8

Sample Input 6

8 9

Sample Output 6

8

Sample Input 7

7 8

Sample Output 7

8
CC BY-NC-SA 4.0