1 solutions
-
1
#include<bits/stdc++.h> using namespace std; int n,x,y; bool prime(int m){ if(m==0) return false; else if(m==1) return false; else for(int i=2;i*i<=m;i++){ if(m%i==0) return false; } return true; } int main(){ cin>>n; x=y=n/2; for(;x>0,y<n;x--,y++){ if(prime(x)&&prime(y)){ cout<<x*y<<endl; break; } } return 0; }//ezezezezezezezezezezezezez
- 1
Information
- ID
- 890
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 10
- Tags
- (None)
- # Submissions
- 4
- Accepted
- 2
- Uploaded By