File tree Expand file tree Collapse file tree 1 file changed +34
-6
lines changed Expand file tree Collapse file tree 1 file changed +34
-6
lines changed Original file line number Diff line number Diff line change 1
- // Authored by : BaaaaaaaaaaarkingDog
1
+ // Authored by : twinkite
2
2
// Co-authored by : -
3
- // http://boj.kr/****************
3
+ // http://boj.kr/6aa20186e0ce4eb18279117cea3d636e
4
4
#include < bits/stdc++.h>
5
5
using namespace std ;
6
6
7
- int main (void ){
8
- ios::sync_with_stdio (0 );
9
- cin.tie (0 );
10
-
7
+ int rule1 (int x){
8
+ return 10000 +x*1000 ;
9
+ }
10
+
11
+ int rule2 (int x){
12
+ return 1000 +x*100 ;
13
+ }
14
+
15
+ int rule3 (int x){
16
+ return x*100 ;
17
+ }
18
+
19
+ int main (){
20
+ ios_base::sync_with_stdio (0 );
21
+ cin.tie (0 );
22
+ int res;
23
+ int arr[4 ];
24
+ for (int i=0 ;i<3 ;i++){
25
+ cin>>arr[i];
26
+ }
27
+
28
+ if (arr[0 ]==arr[1 ] && arr[1 ]==arr[2 ] && arr[0 ]==arr[2 ]) res = rule1 (arr[0 ]);
29
+ else if (arr[0 ]!=arr[1 ] && arr[1 ]!=arr[2 ] && arr[0 ]!=arr[2 ]){
30
+ sort (arr, arr+3 );
31
+ res = rule3 (arr[2 ]);
32
+ } else {
33
+ if (arr[0 ]==arr[1 ]) res = rule2 (arr[0 ]);
34
+ else if (arr[1 ]==arr[2 ]) res = rule2 (arr[1 ]);
35
+ else res = rule2 (arr[0 ]);
36
+ }
37
+ cout<<res;
38
+ return 0 ;
11
39
}
You can’t perform that action at this time.
0 commit comments