Why don't they accept the same solution twice

I have written a code to a problem and say that I submit it to the judge, and my code gets accepted . If I submit the same solution again it gives me an error . Why does this happen ?

because your code is generating different output
in left submission you are constantly updating p

but in right submission you are not updating
and also in right submission allowing I == j

that’s not my code…i mean to ask does the plagiarism tester filter out the submissions?