Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.9 kB
5
Indexable
Never
f = open("input.txt", "r")
z = (f.read())
x = z.split('\n')

pair = []
temppair = []
counter = 0
test = []
for a in x:
    test.append(a)


windraw = 0
item = 0
windraw2= 0
item2 = 0
for b in test:
    
    if b[0]=="A" and b[2]=='X':
        windraw = windraw+3
        item = item + 1
        # -------------
        windraw2 = windraw2 + 0
        item2 = item2 + 3

    elif b[0]=="A" and b[2]=='Y':
        windraw = windraw+6
        item = item + 2
        # -------------
        windraw2 = windraw2 + 3
        item2 = item2 + 1

    elif b[0]=="A" and b[2]=='Z':
        windraw = windraw+0
        item = item + 3
        # -------------
        windraw2 = windraw2 + 6
        item2 = item2 + 2





    if b[0]=="B" and b[2]=='X':
        windraw = windraw+0
        item = item + 1
        # -------------
        windraw2 = windraw2 + 0
        item2 = item2 + 1

    elif b[0]=="B" and b[2]=='Y':
        windraw = windraw+3
        item = item + 2
        # -------------
        windraw2 = windraw2 + 3
        item2 = item2 + 2


    elif b[0]=="B" and b[2]=='Z':
        windraw = windraw+6
        item = item + 3
        # -------------
        windraw2 = windraw2 + 6
        item2 = item2 + 3





    if b[0]=="C" and b[2]=='X':
        windraw = windraw+6
        item = item + 1
        # -------------
        windraw2 = windraw2 + 0
        item2 = item2 + 2


    elif b[0]=="C" and b[2]=='Y':
        windraw = windraw+0
        item = item + 2
        # -------------
        windraw2 = windraw2 + 3
        item2 = item2 + 3



    elif b[0]=="C" and b[2]=='Z':
        windraw = windraw+3
        item = item + 3
        # -------------
        windraw2 = windraw2 + 6
        item2 = item2 + 1




print(windraw2)
print(item2)
print(windraw2+item2)