841B

Правка en1, от asdfghjl, 2017-08-19 11:49:10

For my first solution I was expecting WA because of integer overflow (int sum) but I got TLE instead which is odd because my time complexity is O(n) and it should work for the maximum value of n(10^6)!! Then I just tried the same code with scanf/printf and got AC :| I also changed the type of sum to long long and used cin/cout like the first time and got AC! Can someone tell me WHYYYY?

link to my second solution ink to my third solution

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский asdfghjl 2017-08-19 11:49:38 3 Tiny change: '9589520)\n[ink to my ' -> '9589520)\n\n[link to my '
en1 Английский asdfghjl 2017-08-19 11:49:10 626 Initial revision (published)