-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2476.cpp
More file actions
43 lines (41 loc) · 753 Bytes
/
2476.cpp
File metadata and controls
43 lines (41 loc) · 753 Bytes
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
// 2476. 주사위 게임
// 2020.10.10
// 수학
#include<iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int ans = 0;
int score;
while (n-- > 0)
{
int a, b, c;
cin >> a >> b >> c;
score = 0;
if (a == b && b == c && c == a)
{
score = 10000 + a * 1000;
}
else if (a == b)
{
score = 1000 + a * 100;
}
else if (b == c)
{
score = 1000 + b * 100;
}
else if (c == a)
{
score = 1000 + c * 100;
}
else
{
score = max(max(a, b), c) * 100;
}
ans = max(ans, score);
}
cout << ans << endl;
return 0;
}