Getting WA in MAKEDIV3. Can anyone please tell what's wrong?

MAKEDIV3 Problem
MAKEDIV3 My Solution

1 Like

N is 1e4 in constraints , so any datatype won’t fit in. use strings.

1 Like

Thank you so much people. I didn’t know cpp uses scientific notation to print long numbers.

1 Like