it gives wrong ans when i input n as integer and gives correct one when n is long.
bt the constriants are n<=10000
which is the range of integer only.
please visit
https://practice.geeksforgeeks.org/viewSol.php?subId=18918899&pid=148&user=Juhi%20gupta