Solved by 209 users: ...
UserDateAttemptTimeCMSC
abortmozga.ru`06 apr 2009`Ruby2800.027
abortmozga.ru`06 apr 2009`Ruby2900.027
abortmozga.ru`06 apr 2009`Ruby3000.027
abortmozga.ru`06 apr 2009`Ruby3100.027
abortmozga.ru`06 apr 2009`Ruby3200.027
Jacob`06 apr 2009`Ruby600.0112
814_Vadik`15 may 2009`Ruby1500.0218
814_Vadik`15 may 2009`Ruby1300.0222
814_Vadik`15 may 2009`Ruby1400.0222
Vladimir_Sitnikov`04 apr 2009`Ruby100.0263
stasg7`03 dec 2009`Ruby700.0371
LOD`04 jun 2017`Python400.05103
814_Vadik`15 may 2009`Ruby1200.02111
814_Vadik`15 may 2009`Ruby1100.02113
bush`13 jan 2013`Ruby200.02115
Kopyrin_37.5`08 nov 2013`Ruby1100.02127
bush`13 jan 2013`Ruby100.02138
ethanhunt`25 may 2011`Python700.07144
ethanhunt`25 may 2011`Python800.06147
ethanhunt`25 may 2011`Python600.06148
asp`09 jun 2009`Ruby100.03150
ethanhunt`25 may 2011`Python500.06150
 C++ 118 Java 40 Ruby 22 C 17 FPC 16 Python 6 Kylix 5 Haskell 2
` >  >  >  >  >  >  >  >  >  > `

## Knight's move

Time limit = 1 second

Chess association decided to assign new phone numbers to all the members. The new numbers should be produced with a knight's move on a phone keypad. 0 and 8 are not valid leading digits. For instance, the number 340-49-27 matches the criteria.

 7 8 9 4 5 6 1 2 3 0

Create a program that computes the number of different phone numbers with a length N.

Input Integer N ( 1 ≤ N ≤ 100 )

Output Number of valid phone numbers

 Input#1```2 ``` Output#1```16 ```

Author:
Peculiarities of national computer science problems
2000

 © acm.mipt DevGroupThe page was generated in 190ms