Hackerrank Nov 20/20: Bday Gift

Didn't pass half the test cases due to TLE.