A = [int(x) for x in input().split()] B = [int(x) for x in input().split()] if (sum(A)>sum(B)): print('Algosia') elif (sum(B)<sum(A)): print('Bajtek') else: Acounter = [0 for i in range(11)] Bcounter = [0 for i in range(11)] for i in range(len(A)): Acounter[A[i]] += 1 Bcounter[B[i]] += 1 x = 10 while (x>=0): if Acounter[x]>Bcounter[x]: print('Algosia') break if Acounter[x]<Bcounter[x]: print('Bajtek') break x-=1 else: print('remis')
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | A = [int(x) for x in input().split()] B = [int(x) for x in input().split()] if (sum(A)>sum(B)): print('Algosia') elif (sum(B)<sum(A)): print('Bajtek') else: Acounter = [0 for i in range(11)] Bcounter = [0 for i in range(11)] for i in range(len(A)): Acounter[A[i]] += 1 Bcounter[B[i]] += 1 x = 10 while (x>=0): if Acounter[x]>Bcounter[x]: print('Algosia') break if Acounter[x]<Bcounter[x]: print('Bajtek') break x-=1 else: print('remis') |