这道题虽然是道YY题,就两行代码,但挺锻炼思维的
#include <iostream> #include <cstdio> using namespace std; int main() { int n; while(cin>>n&&n) { if(n%2==0) cout<<"No Solution!"<<endl; else cout<<n-1<<endl; } return 0; }
这道题虽然是道YY题,就两行代码,但挺锻炼思维的
#include <iostream> #include <cstdio> using namespace std; int main() { int n; while(cin>>n&&n) { if(n%2==0) cout<<"No Solution!"<<endl; else cout<<n-1<<endl; } return 0; }