I am getting Different answers on my PC(g++ (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609 compiler) and the compilers on CodeForces such as G++ 11,G++ 14, G++ 17 for the Problem 1060B. The output on MY PC is 91 for input (10000000000) and the output on G++ 17,G++ 14, G++ 11 is 82 for the same input. I am Attaching two screenshots . First One is of MY PC and the other is of G++ 17 compiler on CodeForces. Should I use a differnet compiler for c++ programs on CodeForces ? Please help me through this. Link for first image: /predownloaded/55/7d/557de76deecb86d12ca5e0e6ebbfcbe7402264f6.jpg Link for second image: /predownloaded/b1/0e/b10e376600e2f8dc1b7faab67874bb0fe34fa09f.jpg








In your submission here, input is overflowing the value of n. Output divergence is caused by the difference in compilers.
Output of -
On codeforces:
On my PC/probably in yours too:
You can try using
long longfor 8-byte integer.