Same Code , Different Result in STRPTRE

Problem link : STRPTRE Problem - CodeChef
Solution 1: CodeChef: Practical coding for everyone (AC)
Solution 2:CodeChef: Practical coding for everyone (Partial Correct)

Both the code is exactly same as far as I can see but the result is quite shocking .I am trying to find the reason or difference because of which the second solution has got only 50 points .Could anyone please help ?

line 24, in 50 points solution you forgot to add one zero --> for(i=1;i<=10000;i++) should be i<= 100000