-Code
gan_points = [1, 2, 3, 3, 4, 10]
sa_points = [1, 2, 2, 2, 3, 5, 10]
for tc in range(1, int(input()) + 1):
human = list(map(int, input().split()))
monster = list(map(int, input().split()))
h_point, m_point = 0, 0
for i in range(6):
h_point += gan_points[i] * human[i]
for i in range(7):
m_point += sa_points[i] * monster[i]
if h_point > m_point:
print(f"Battle {tc}: Good triumphs over Evil")
elif h_point < m_point:
print(f"Battle {tc}: Evil eradicates all trace of Good")
else:
print(f"Battle {tc}: No victor on this battle field")
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 10174번 팰린드롬 (0) | 2022.06.07 |
---|---|
[백준/파이썬] 4592번 중복을 없애자 (0) | 2022.06.06 |
[백준/파이썬] 9226번 도깨비말 (0) | 2022.06.04 |
[백준/파이썬] 22388번 改元 (0) | 2022.06.03 |
[백준/파이썬] 22380번 割り勘 (0) | 2022.06.03 |