1 solutions
-
0
#include <stdio.h> int isprime(int a) { int k; int ret=1; for(k=2;k<a-1;k++){ if(a%k0){ ret=0; } } return ret; } int main() { int n,i,m; int cnt=0; scanf("%d",&n); for(i=3;i<n;i=i+2){ if(isprime(i)){ for(m=i+2;m<n;m+=2){ if(isprime(m)){ if(i+2m){ printf("%d %d\n",i,m); cnt=1; } } if(cnt1){break;} } } } if(cnt0){ printf("empty"); } return 0; }
- 1
Information
- ID
- 6800
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 6
- Tags
- (None)
- # Submissions
- 78
- Accepted
- 27
- Uploaded By