Whats the issue with these builtin function in c++?

Правка en1, от srijon_32, 2025-01-07 17:28:46

Here are my two submission for problem : 1158A - The Party and Sweets

  1. using accumulate function: 300047140

  2. using loop: 300047827

1st one giving wrong answer. Previously, the same thing happened with sqrt, and then I used binary search to find sqrt. So after this WA, I used a loop to get the sum, and now it's giving the correct answer. So where has this accumulate function gone wrong?

Теги help, built-in functions

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский srijon_32 2025-01-07 17:28:46 469 Initial revision (published)