//不是我的 #include<stdio.h> main() { int h,a,b,k,n=1,t=0,i,j; while(scanf("%d",&h)!=EOF) { scanf("%d %d %d",&a,&b,&k); {for(j=0;h>0&&j<100;j++) for(i=0;i<k;i++) { h=h-a; if(h<1) { t=1; } else { h=h+b; } } h=h+b; } if(t==1)printf("Case#%d:White Win",n++); else printf("Case#%d:Unknow",n++); } } |
Double click to view unformatted code.