#!/usr/bin/env python3 def wczytaj(): line = input() numbers = sorted(map(int, line.split(' ')), reverse=True) return tuple(numbers) def compare(x, y): if x > y: return 'Algosia' if x < y: return 'Bajtek' return None def main(): a = wczytaj() b = wczytaj() print(compare(sum(a), sum(b)) or compare(a, b) or 'remis') if __name__ == '__main__': main()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #!/usr/bin/env python3 def wczytaj(): line = input() numbers = sorted(map(int, line.split(' ')), reverse=True) return tuple(numbers) def compare(x, y): if x > y: return 'Algosia' if x < y: return 'Bajtek' return None def main(): a = wczytaj() b = wczytaj() print(compare(sum(a), sum(b)) or compare(a, b) or 'remis') if __name__ == '__main__': main() |