5 Answers
New Answercode is fine. but If you use Integer.parseInt() you may get overflow error. So try long type or anyother higher types.. To understand it more, Check code by input : 20 then 2000
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message