0
In my code the output is coming "Time limit exceeded" how can I make it more efficient
code for finding if the number is prime,if it's reverse is prime & if all the digits are prime ⬇️⬇️code link⬇️⬇️ https://code.sololearn.com/cUX4IyPjluIt/?ref=app
2 Antworten
+ 1
thanks its runin' perfectly
0
inside rev function
check the statement
for(;a > 0;)
it's infinite loop
-- ======================
Make it as follow :
int rev(int a){
int g;
while(a != 0)
{
g = g*10 + (a%10);
a /= 10;
}
return g;
}