I don’t know why I just get Wrong Answer, Please give me some advice, Thank you.
My method is first check digits count then make different d(the sum of all digits), and just check if d can divided by 3.
Long Long int has a range of 10^10 but in the constraints the value of d can have a maximum of 10^12 input so some of your data is lost due to to less range.
Resolve the issue in line no. 9 .
1 Like
That is not true. A long long int can hold values up to 9.2\times 10^{18}
1 Like
Thanks for reply!
That makes me notice my variable k, d, d0, d1, d2 also need to be long long.
I just get Correct Answer!
1 Like