One wrong answer

my code has passed the sample test case but giving one wrong answer
link is https://ide.codingblocks.com/s/223877

@mayank10
Your code will produce a TLE for large input files because your n1 is 1000000 and u have used i*i in your code. try to reduce your complexity

sorry i have provided you the wrong link https://ide.codingblocks.com/s/225239

@mayank10
for test case like 93968 you are getting nosuchelementexception

i have taken all the numbers till 10000 in hashmap why it shows such exception

@mayank10
NoSuchElementException indicates that the element being requested does not exist. so try to check your loops if they are running for more iterations than needed

in main method i run a loop untill 0 is given as input as given in the question and in other function i stored the sum of factors of first 10000 numbers.

@mayank10
my bad i tired to run it without a 0 at end .
when u run 93968 u should get 93967 but u are getting -1 …see to that

this is my simplified code … u can refer to this