fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a,b,c, team1=0, team2=0;
  6.  
  7. cin>>a>>b>>c;
  8. team1+=a+b*2+c*3;
  9.  
  10. cin>>a>>b>>c;
  11. team2+=a+b*2+c*3;
  12.  
  13. if(team1>team2)
  14. cout<<1;
  15. else if(team1<team2)
  16. cout<<2;
  17. else
  18. cout<<0;
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5324KB
stdin
1 2 3
0 1 4
stdout
Standard output is empty