|
|
back to boardIsn't this simple code correct??? Or L in my solution is not minimal? #include <fstream.h> #include <math.h> int main() { long k, q=1; cin>>k; for(long i=2; i<k; i++) if(k%i==1) {cout<<i<<'\n'; q=0; break;} if(q) cout<<"0\n"; return 0; } |
|
|