File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ import sys
2+
3+ input = sys .stdin .readline
4+ output = sys .stdout .write
5+
6+
7+ def rock_paper_scissors_lizard_spock_judge (sheldons_hand , rajeshs_hand ):
8+ if sheldons_hand == rajeshs_hand :
9+ return 0
10+
11+ if sheldons_hand == 'tesoura' and rajeshs_hand in ('papel' , 'lagarto' ):
12+ return 1
13+ if sheldons_hand == 'papel' and rajeshs_hand in ('pedra' , 'Spock' ):
14+ return 1
15+ if sheldons_hand == 'pedra' and rajeshs_hand in ('lagarto' , 'tesoura' ):
16+ return 1
17+ if sheldons_hand == 'lagarto' and rajeshs_hand in ('Spock' , 'papel' ):
18+ return 1
19+ if sheldons_hand == 'Spock' and rajeshs_hand in ('tesoura' , 'pedra' ):
20+ return 1
21+
22+ return - 1
23+
24+
25+ t = int (input ())
26+ for case_index in range (1 , t + 1 ):
27+ sheldons_hand , rajs_hand = input ().split ()
28+
29+ result = rock_paper_scissors_lizard_spock_judge (sheldons_hand , rajs_hand )
30+
31+ output (f'Caso #{ case_index } : ' )
32+ if result == 1 :
33+ output ('Bazinga!\n ' )
34+ elif result == 0 :
35+ output ('De novo!\n ' )
36+ else :
37+ output ('Raj trapaceou!\n ' )
You can’t perform that action at this time.
0 commit comments