HACKERRANK - Manasa Loves Maths

https://www.hackerrank.com/contests/mar14/challenges/manasa-loves-maths