Help ! success in all public test cases but gives WA

Use long long int instead of int to avoid int overflow