My code is giving wrong answer for 2 test-cases.
Please review it once and help me get it correct.
ide : https://ide.codingblocks.com/s/193013
T-Prime code Number theory
hey @aman_ishan you arent dealing with long variables correctly
- when taking in input of array elements use nextLong not nextInt
- when adding elements into chk dont do i*i instead assign i to long temp and add temp * temp
Here is your code after rectifications:
https://ide.codingblocks.com/s/193051
Thank you so much sir.