1 solutions
-
0
#include <stdio.h> int isprime(int a) { int k; int ret=1; for(k=2;k<a-1;k++){ if(a%k==0){ ret=0; break; } } return ret; } int main() { int t,m; int n=10; while(n<100){ if(isprime(n)){ int sum=0; m=n%10; t=n/10%10; sum=m*10+t; if(isprime(sum)){ printf("%d\n",n); } } n++; } return 0; }
- 1
Information
- ID
- 6797
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 5
- Tags
- (None)
- # Submissions
- 81
- Accepted
- 31
- Uploaded By