def kto(): A = sorted(map(int, input().split()), reverse=True) B = sorted(map(int, input().split()), reverse=True) sa = sb = 0; for i in A: sa+=i for i in B: sb+=i if sa > sb: print('Algosia') return() if sb > sa: print('Bajtek') return() for sa,sb in zip(A,B): if sa > sb: print('Algosia') return() if sb > sa: print('Bajtek') return() print('remis') kto()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | def kto(): A = sorted(map(int, input().split()), reverse=True) B = sorted(map(int, input().split()), reverse=True) sa = sb = 0; for i in A: sa+=i for i in B: sb+=i if sa > sb: print('Algosia') return() if sb > sa: print('Bajtek') return() for sa,sb in zip(A,B): if sa > sb: print('Algosia') return() if sb > sa: print('Bajtek') return() print('remis') kto() |