My exact same code worked when I replaced all my x*x with pow(x,2). I am unable to understand why. Can anyone explain?
Code with x*x: CodeChef: Practical coding for everyone
Code with pow(x,2): CodeChef: Practical coding for everyone
My exact same code worked when I replaced all my x*x with pow(x,2). I am unable to understand why. Can anyone explain?
Code with x*x: CodeChef: Practical coding for everyone
Code with pow(x,2): CodeChef: Practical coding for everyone
She’s already getting AC with pow, she’s asking for WA with x*x?
my bad.
its just overflow . cast to long long
WA in the first code is due to int overflow. Define i and j as long long.
Missed that! Thanks a ton.