Skip to content

Instantly share code, notes, and snippets.

@enzerr
Created February 7, 2023 19:13
Show Gist options
  • Save enzerr/d094ff0de756391e7fa776cd30af2882 to your computer and use it in GitHub Desktop.
Save enzerr/d094ff0de756391e7fa776cd30af2882 to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
int main(){
string ini; cin >> ini;
char dominante = ini[1];
int Luana = 0;
for(int i = 0; i < 3; i++){
string carta; cin >> carta;
if(carta[0]=='A') Luana+=10;
if(carta[0]=='J') Luana+=11;
if(carta[0]=='Q') Luana+=12;
if(carta[0]=='K') Luana+=13;
if(carta[1]==dominante) Luana+=4;
}
int Edu = 0;
for(int i = 0; i < 3; i++){
string carta; cin >> carta;
if(carta[0]=='A') Edu+=10;
if(carta[0]=='J') Edu+=11;
if(carta[0]=='Q') Edu+=12;
if(carta[0]=='K') Edu+=13;
if(carta[1]==dominante) Edu+=4;
}
if(Luana>Edu) cout << "Luana\n";
else if(Edu>Luana) cout << "Edu\n";
else cout << "empate\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment