Computer Programming || Gaming || Technology || ai

Solution : URI Online Judge | 2059 Odd, Even or Cheating


#include

using namespace std;

int main() {

/**
* Escreva a sua solução aqui
* Code your solution here
* Escriba su solución aquí
*/
int a,b,c,d,e;
cin>>a>>b>>c>>d>>e;
if(d)
{
if(e)
cout<<"Jogador 2 ganha!\n"; else cout<<"Jogador 1 ganha!\n"; } else { if(e) cout<<"Jogador 1 ganha!\n"; else{ int sum=c+b; int r; if(sum%2) r=0; else r=1; if(r==a) cout<<"Jogador 1 ganha!\n"; else cout<<"Jogador 2 ganha!\n"; } } return 0; }

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *




Calender

October 2020
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031