Need help for Knight Moves-spoj problem

Revision en1, by ak3899, 2018-10-11 19:57:06

what is the intuition behind this question spoj:

i am trying but able to find the correct solution for it please some one help. Btw the question is ::

A knight is located at the (black) origin of an infinite chessboard. Let f(n) define the number of black squares the knight can reach after making exactly n moves. Given n (0 <= n <= 108), output f(n).

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ak3899 2018-10-11 19:57:06 441 Initial revision (published)