C=input().split() A=[int(i) for i in C] D=input().split() B=[int(i) for i in D] s1=sum(A) s2=sum(B) A10=A.count(10) B10=B.count(10) A9=A.count(9) B9=B.count(9) A8=A.count(8) B8=B.count(8) A7=A.count(7) B7=B.count(7) A6=A.count(6) B6=B.count(6) A5=A.count(5) B5=B.count(5) A4=A.count(4) B4=B.count(4) A3=A.count(3) B3=B.count(3) A2=A.count(2) B2=B.count(2) A1=A.count(1) B1=B.count(1) if s1>s2: print("Algosia") elif s2>s1: print("Bajtek") else: if A10>B10: print("Algosia") elif A9>B9: print("Algosia") elif A8>B8: print("Algosia") elif A7>B7: print("Algosia") elif A6>B6: print("Algosia") elif A5>B5: print("Algosia") elif A4>B4: print("Algosia") elif A3>B3: print("Algosia") elif A2>B2: print("Algosia") elif A1>B1: print("Algosia") elif A10<B10: print("Bajtek") elif A9<B9: print("Bajtek") elif A8<B8: print("Bajtek") elif A7<B7: print("Bajtek") elif A6<B6: print("Bajtek") elif A5<B5: print("Bajtek") elif A4<B4: print("Bajtek") elif A3<B3: print("Bajtek") elif A2<B2: print("Bajtek") elif A1<B1: print("Algosia") 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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | C=input().split() A=[int(i) for i in C] D=input().split() B=[int(i) for i in D] s1=sum(A) s2=sum(B) A10=A.count(10) B10=B.count(10) A9=A.count(9) B9=B.count(9) A8=A.count(8) B8=B.count(8) A7=A.count(7) B7=B.count(7) A6=A.count(6) B6=B.count(6) A5=A.count(5) B5=B.count(5) A4=A.count(4) B4=B.count(4) A3=A.count(3) B3=B.count(3) A2=A.count(2) B2=B.count(2) A1=A.count(1) B1=B.count(1) if s1>s2: print("Algosia") elif s2>s1: print("Bajtek") else: if A10>B10: print("Algosia") elif A9>B9: print("Algosia") elif A8>B8: print("Algosia") elif A7>B7: print("Algosia") elif A6>B6: print("Algosia") elif A5>B5: print("Algosia") elif A4>B4: print("Algosia") elif A3>B3: print("Algosia") elif A2>B2: print("Algosia") elif A1>B1: print("Algosia") elif A10<B10: print("Bajtek") elif A9<B9: print("Bajtek") elif A8<B8: print("Bajtek") elif A7<B7: print("Bajtek") elif A6<B6: print("Bajtek") elif A5<B5: print("Bajtek") elif A4<B4: print("Bajtek") elif A3<B3: print("Bajtek") elif A2<B2: print("Bajtek") elif A1<B1: print("Algosia") else: print("remis") |