WIERD C++ BEHAVIOUR I CAN'T UNDERSTAND

Revision en1, by naivedyam, 2024-12-02 12:03:54

I was recently trying out a CSES problem Coin Combinations 2 and THIS CODE GAVE ME MULTIPLE RUNTIME ERRORS while THIS ONE PASSED. If you look closely, both are exact same codes except that the one with runtime errors uses long long instead of int. Why using long long is giving runtime errors here?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English naivedyam 2024-12-02 12:03:54 476 Initial revision (published)