-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path1218.py
More file actions
36 lines (31 loc) · 807 Bytes
/
1218.py
File metadata and controls
36 lines (31 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
caso = 0
while True:
try:
lista = []
lista2 = []
soma = 0
somaf = 0
somam = 0
entrada = input()
entrada2 = input().split()
for x in entrada2:
if x.isdigit() == True:
lista.append(x)
else:
lista2.append(x)
for a,b in enumerate(lista):
if b == entrada:
soma += 1
if lista2[a] == "F":
somaf += 1
else:
somam += 1
if caso >= 1:
print("")
caso += 1
print("Caso %d:" % caso)
print("Pares Iguais: %d" % soma)
print("F: %d" % somaf)
print("M: %d" % somam)
except:
break