+ 1
Some of my codes are working properly in apps like Dcoder but not in the code playground of Sololearn. What did I do wrong?
This code for emirp primes does not work in the code playground. Error type: doesnt give positive result for true input values. https://code.sololearn.com/c34N8G0FLpxe/?ref=app
2 odpowiedzi
+ 1
Your major issue is line 27 as a should be initialized to 0. Minor issues: you could replace line 17, 19, and 21 with a 19 of:
a = a*10+n%10;
and you could remove a from 27, on 30 replace a++ with break, and replace lines 33 to 36 with:
return i == n;
0
John Wells Thank you for your corrections.