Open
Description
2480: 주사위 세계
아이디어
if문 사용
구현
삼항연산자, if문을 통해 조건에 맞게 구현
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int a, b, c;
cin >> a >> b >> c;
if(a == b && b == c) {
cout << 10000 + a * 1000;
}else if(a == b || b == c || a == c) {
cout << 1000 + (a == b ? a : b == c ? b : a == c ? c : 0) * 100;
}else {
cout << max(max(a,b), c) * 100;
}
return 0;
}