其他分享
首页 > 其他分享> > 1071 小赌怡情 较简单

1071 小赌怡情 较简单

作者:互联网

include

include

using namespace std;
int main()
{
int T,k;
int n1,b,t,n2;
cin>>T>>k;
for(int i=0;i<k;i++){
cin>>n1>>b>>t>>n2;
if(t>T){
cout<<"Not enough tokens. Total = "<<T<<"."<<endl;
continue;
}
if(int(n1<n2)==b){
T+=t;
cout<<"Win "<<t<<"! Total = "<<T<<"."<<endl;
}
else{
T-=t;
cout<<"Lose "<<t<<". Total = "<<T<<"."<<endl;
if(T<=0){
cout<<"Game Over.";
break;
}
}
}
return 0;
}

标签:小赌,怡情,cout,int,cin,1071,n1,n2,include
来源: https://www.cnblogs.com/wodeblog1982/p/16469388.html