Notice
Recent Posts
Recent Comments
Link
«   2026/06   »
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
Archives
Today
Total
관리 메뉴

dh-winternagi 님의 블로그

(2480) 주사위 세개 본문

백준 (C++)/Solve

(2480) 주사위 세개

dh-winternagi 2026. 4. 8. 14:55

https://www.acmicpc.net/problem/2480

단계별로 풀어보기

2단계(조건문) 7번째

 

 

 

#include <iostream>
#include <algorithm>
using namespace std;

int main() 
{
  int a, b, c;
  
  cin >> a >> b >> c;
  
  if(a==b && b==c){
    cout << 10000+a*1000;
  }else if(a==b){
    cout << 1000+a*100;
  }else if(b==c){
    cout << 1000+b*100;
  }else if(c==a){
    cout << 1000+c*100;
  }else{
    cout << max({a, b, c})*100;
  }
  
  return 0;
}

'백준 (C++) > Solve' 카테고리의 다른 글

(10950) A+B - 3  (0) 2026.04.08
(2739) 구구단  (0) 2026.04.08
(2525) 오븐 시계  (0) 2026.04.08
(2884) 알람 시계  (0) 2026.04.08
(14681) 사분면 고르기  (0) 2026.04.08