#include<bits/stdc++.h> using namespace std; int main() { //这里规定石头的代表数字是0,剪刀是1,布是2 int x,y; cin>>x>>y; if(x==0) { if(y==1

王思洋  •  2年前


#include<bits/stdc++.h> 
using namespace std; 
int main() { 
//这里规定石头的代表数字是0,剪刀是1,布是2 
int x,y; 
cin>>x>>y; 
if(x==0) 

 if(y==1) 
  cout<<"winner:1"; 
 else 
  cout<<"winner:2"; 

else if(x==1) 

 if(y==2) 
  cout<<"winner:1"; 
 else 
  cout<<"winner:2"; 

else 

 if(y==0) 
  cout<<"winner:1"; 
 else 
  cout<<"winner:2"; 

return 0; 
}


评论: