idonthatephy's blog

By idonthatephy, history, 6 weeks ago, In English

1574C - Slay the Dragon--this is the problem given below is my code- 158115252 it is failing test case 3 because of integer overflow, is there any way to overcome the integer overflow?

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Change from

ll sum=10e9;

to:

ll sum=LLONG_MAX;