#include <stdio.h> #include <string.h> #include <math.h> #define N 10000 int is(int n) { int i,flag=1; if(n==1) return 1; else for(i=2;i<n;i++) if(n%i==0) return 0; return flag; } int main() { int n; int i; int k=1; while(scanf("%d",&n)!=EOF) { if(is(n)==1) printf("Case #%d: I'm richer than any one\n",k++); else printf("Case #%d: What a fxcking day\n",k++); } return 0; } |
Double click to view unformatted code.