View Code of Problem 119

#include<stdio.h>
bool sushu(int m){
	for(int i=2;i<(m/2+1);i++){
		if(m%i==0){
			return false;
		}
	}
	return true;
}
int main(){
	int N,n=0;
	while(scanf("%d",&N)!=EOF){
		n++;
		if(sushu(N)){
			printf("Case #%d: I'm richer than any one\n",n);
		}
		else{
			printf("Case #%d: What a fxcking day\n",n);
		}
	} 
}

Double click to view unformatted code.


Back to problem 119