标签:ota mic cin name return include code http nbsp
水题。
#include<iostream> using namespace std; int main() { int t,k,n1,b,tt,n2; cin>>t>>k; for(int i = 0; i < k; ++i) { cin>>n1>>b>>tt>>n2; if(tt > t) { printf("Not enough tokens. Total = %d.\n",t); } else { if((n1 > n2 && b == 0) || (n1 < n2 && b == 1)) { printf("Win %d! Total = %d.\n",tt,t+=tt); } else { printf("Lose %d. Total = %d.\n",tt,t-=tt); if(t == 0) { printf("Game Over.\n"); break; } } } } return 0; }
标签:ota mic cin name return include code http nbsp
原文地址:https://www.cnblogs.com/keep23456/p/12357965.html