-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4435.cpp
47 lines (43 loc) · 972 Bytes
/
4435.cpp
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
// 4435. 중간계 전쟁
// 2021.04.20
// 구현
#include<iostream>
using namespace std;
int gan[6] = { 1,2,3,3,4,10 };
int sau[7] = { 1,2,2,2,3,5,10 };
int main()
{
int t;
cin >> t;
int x;
int sum1 = 0;
int sum2 = 0;
for (int testCase = 1; testCase <= t; testCase++)
{
sum1 = 0;
sum2 = 0;
for (int i = 0; i < 6; i++)
{
cin >> x;
sum1 += x * gan[i];
}
for (int i = 0; i < 7; i++)
{
cin >> x;
sum2 += x * sau[i];
}
if (sum1 < sum2)
{
cout << "Battle " << testCase << ": Evil eradicates all trace of Good" << endl;
}
else if (sum1 > sum2)
{
cout << "Battle " << testCase << ": Good triumphs over Evil" << endl;
}
else
{
cout << "Battle " << testCase << ": No victor on this battle field" << endl;
}
}
return 0;
}