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