This post was flagged by the community and is temporarily hidden.
change int n to long long n in check function. your sum variable is long long.
change int to ll in function argument.
thank you! I missed that.
This post was flagged by the community and is temporarily hidden.
change int n to long long n in check function. your sum variable is long long.
change int to ll in function argument.
thank you! I missed that.