#include <iostream> using namespace std; int main(){ int h,a,b,k,t=1; while(cin>>h>>a>>b>>k){ for(int i=0;i<k;i++){ h -= a; if(h<1){ cout<<"Case #"<<t<<": White win"<<endl; break; } else h += b; } if(h>=1){ cout<<"Case #"<<t<<": Unknow"<<endl; } t++; } return 0; } |
Double click to view unformatted code.