4th Mar 2018, 9:25 PM
Angela Carraro
Angela Carraro - avatar
3 Answers
+ 2
its a commom casting problem with pow, take a look at the solution a gave in this code, It might help https://code.sololearn.com/cvjK2RXzrA1Z/?ref=app
4th Mar 2018, 9:30 PM
capsloth
capsloth - avatar
0
Thanks! The point of my question was also that if you use a gcc compiler for example, this problem doesn't exist... It happens only with the compiler of SoloLearn.
5th Mar 2018, 8:38 AM
Angela Carraro
Angela Carraro - avatar
0
You can simply change p from int to double on line 6 and drop the cast to int on line 8
7th Mar 2018, 1:33 AM
đŸ€– Basile Laderchi