+ 1

Please could someone help me explain what's happening in this code... A thorough explanation please..

https://code.sololearn.com/WWub4idNPqi8/?ref=app

31st Dec 2017, 6:53 AM
Sammy
Sammy - avatar
2 ответов
+ 2
thanks bro
31st Dec 2017, 1:27 PM
Sammy
Sammy - avatar
+ 1
If you output the "sum" variable in the final line, you will get 18, then if you set p = 2, the result of the sum is 17 (that is correct), it doesn't need to analyze number 0 and 1 :)
31st Dec 2017, 7:14 AM
Sebastián Zapata
Sebastián Zapata - avatar