#include<iostream> using namespace std; bool sushu(int n) { int t=0; for(int i=2;i<n;i++) { if(n%i==0) t++; } if(t==0) return true; else return false; } int main() { int n; int t=0; while(cin>>n) { t++; if(n==1) cout<<"Case #"<<t<<":"<<" I'm richer than any one"<<endl; else if(sushu(n)) cout<<"Case #"<<t<<":"<<" I'm richer than any one"<<endl; else cout<<"Case #"<<t<<":"<<" What a fxcking day"<<endl; } } |
Double click to view unformatted code.