Solve me second : Hacker Rank Problem Solution

Solve me second : Hacker Rank Problem Solution



C Implementation:



Python Implementation: