View Code of Problem 119

#include<bits/stdc++.h>
using namespace std;

int main() {

	int n;
	int o=0;
	while(cin>>n) {
		o++;
		int flag=0;
		for(int i=2; i*i<=n; i++) {
			if(n%i==0) {
				flag=1;
				break;
			}
		}
		if(flag==0) {
			cout<<"Case #"<<o<<": I'm richer than any one"<<endl;
		} else {
			cout<<"Case #"<<o<<": What a fxcking day"<<endl;
		}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 119