АВТ
Language: Russian
English

Remote Training on Programming

Problems Online status Contests
News FAQ E-learning
For authors:
Register  ||  Login
 
Hello, Guest! Please login or register.

1590. Painting the Natural Numbers

Time Limit: 1 seconds
Memory Limit:262144KB
Points:100
View Problem Statistics Submit Problem added debug

The H&H company currently develops AI (artificial intelligence) for the game. The goal of the game is to paint all the natural numbers from 1 to N in 10 colors so that if the numbers a and b (a and b are not necessarily different) are one color, then a + b has to be another color. Help H&H.

Входные данные

The input consists of the only integer N (1 ≤ N ≤ 25000).

Выходные данные

Output N numerals from 0 to 9 (each numeral indicates the color of the current number). If solutions does not exist, write N zeros to the output.

Пример

Входные данные
10
Выходные данные
0102010301


View Problem Statistics Submit Problem discussion Author/source:
Problems from Contests and Camps / Trainings in Perm 2009 / 07.07.09 Big Contest /
1589. H - The Fence 1590. 1591. J - Selection 1592. K - Parquet
time generating 0.297 sec.
© Copyright VSU, AVT, Nosov D.A., Andrianov I.A.