I have tested this with the sample input and with my own input, and I don’t know why I got wa. Can someone take a look at it?
Input:
5
1
10
20
30
1000000
Expected o/p:
1
10
20
30
1000000
Your o/p:
1
10
20
30
9999
I'm sure you got your mistake now!
Hope this helps! :)
2 Likes
Thank you
1 Like
anytime!