#4435: 중간계 전쟁
싸움의 수 T는 첫 번째 줄에 주어집니다. 각 싸움은 두 줄로 구성됩니다. 첫 번째 줄은 간달프의 군대에 참가한 종족의 수를 나타냅니다. 이러한 값은 공백으로 구분되며 호빗, 인간, 엘프, 드워프,
www.acmicpc.net
문제를 해결하다
문제의 조건에 따라 각 팀의 점수 합계를 찾은 후 출력한다.
올바른 응답 코드
for i in range(1, int(input()) + 1) :
G = list(map(int, input().split()))
S = list(map(int, input().split()))
G_score = G(0) + G(1) * 2 + (G(2) + G(3)) * 3 + G(4) * 4 + G(5) * 10
S_score = S(0) + (S(1) + S(2) + S(3)) * 2 + S(4) * 3 + S(5) * 5 + S(6) * 10
if G_score > S_score : print("Battle {:d}: Good triumphs over Evil".format(i))
elif G_score < S_score : print("Battle {:d}: Evil eradicates all trace of Good".format(i))
else : print("Battle {:d}: No victor on this battle field".format(i))