Can someone explain to me how this was casted to long long?

Правка en1, от Leonardo_Paes, 2025-12-31 02:13:28

In last educational problem C, I submitted what I thought was a wrong code (I even resubmmited shortly after). I didn't declare my answer variable as a long long, even though the worst case is 5000^3 which exceeds 10^10. Here is my code https://mirror.codeforces.com/contest/2182/submission/355744056

I suspect something weird is happening in the last cout, where the compiler is treating it as a long long, even though there is an int and an unsigned int being multiplied.

Any help is appreciated!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Leonardo_Paes 2025-12-31 02:13:28 556 Initial revision (published)