a=0 b=0 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18=map(int,input().split()) b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18=map(int,input().split()) listaA=[a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18] listaB=[b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18] for i in range(18): if (listaA[i])>10 or (listaA[i])<0: print(listaA[i]) print("źle wprowadzone dane, wprowadź ponownie:") a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18=map(int,input().split()) for j in range(18): if (listaB[j])>10 or (listaB[j])<0: print(listaB[j]) print("źle wprowadzone dane, wprowadź ponownie:") b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18=map(int,input().split()) a=a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12+a13+a14+a15+a16+a17+a18 b=b1+b2+b3+b4+b5+b6+b7+b8+b9+b10+b11+b12+b13+b14+b15+b16+b17+b18 if a>b: print("Algosia") if b>a: print("Bajtek") if a==b: for k in range(10,0,-1): sumaa=0 sumab=0 for l in range(len(listaA)): if listaA[l]==k: sumaa+=listaA[l] for m in range(len(listaB)): if listaB[m]==k: sumab+=listaB[m] if sumaa>sumab: print("Algosia") break elif sumab>sumaa: print("Bajtek") break elif k==2: print("remis") break
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 | a=0 b=0 a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18=map(int,input().split()) b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18=map(int,input().split()) listaA=[a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18] listaB=[b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18] for i in range(18): if (listaA[i])>10 or (listaA[i])<0: print(listaA[i]) print("źle wprowadzone dane, wprowadź ponownie:") a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18=map(int,input().split()) for j in range(18): if (listaB[j])>10 or (listaB[j])<0: print(listaB[j]) print("źle wprowadzone dane, wprowadź ponownie:") b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18=map(int,input().split()) a=a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12+a13+a14+a15+a16+a17+a18 b=b1+b2+b3+b4+b5+b6+b7+b8+b9+b10+b11+b12+b13+b14+b15+b16+b17+b18 if a>b: print("Algosia") if b>a: print("Bajtek") if a==b: for k in range(10,0,-1): sumaa=0 sumab=0 for l in range(len(listaA)): if listaA[l]==k: sumaa+=listaA[l] for m in range(len(listaB)): if listaB[m]==k: sumab+=listaB[m] if sumaa>sumab: print("Algosia") break elif sumab>sumaa: print("Bajtek") break elif k==2: print("remis") break |