cppOlimp/basketball.cpp

23 lines
370 B
C++
Raw Normal View History

2022-02-07 22:33:05 +03:00
//acmp.ru 0061 basketball.cpp 5%
#include <stdio.h>
int main(){
freopen("INPUT.TXT", "r", stdin);
freopen("OUTPUT.TXT", "w", stdout);
short a,b,tota=0, totb=0;
for(int i = 0; i < 4; i++){
scanf("%hi %hi", &a, &b);
tota = tota + a;
totb = totb + b;
}
if (tota > totb){
printf("1");
}else if (totb > tota){
printf("2");
}else {
printf("DRAW");
}
}