testcase 4 and testcase 5 is failing.
@srshubhi398 hey shubhi this is due to range issue of the datatype use long long int.
thanks for your help.it worked.