Submission #73685


ソースコード

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
#include <bits/stdc++.h>
using namespace std;
int main(){
int a , b , c , max1 , max2;
cin>>a>>b>>c;
max1 = max({a,b,c});
if(max1 == a){
if(b > c){
max2 = b;
} else {
max2 = c;
}
} else if(max1 == b){
if(a > c){
max2 = a;
} else {
max2 = c;
}
} else {
if(a > b){
max2 = a;
} else {
max2 = b;
}
}
cout<<max1 + max2<<endl;
return(0);
}

ステータス

項目 データ
問題 1423 - 試験
ユーザー名 ei2215
投稿日時 2022-09-20 15:53:31
言語 C++17
状態 Accepted
得点 100
ソースコード長 540 Byte
最大実行時間 29 ms
最大メモリ使用量 708 KB

セット

セット 得点 Cases
1 ALL 100 / 100 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
01-01.txt AC 29 ms 600 KB
1
01-02.txt AC 19 ms 444 KB
1
01-03.txt AC 21 ms 412 KB
1
01-04.txt AC 23 ms 512 KB
1
01-05.txt AC 22 ms 612 KB
1
01-06.txt AC 25 ms 464 KB
1
01-07.txt AC 26 ms 440 KB
1
01-08.txt AC 21 ms 412 KB
1
01-09.txt AC 23 ms 512 KB
1
01-10.txt AC 20 ms 608 KB
1
sample-01.txt AC 22 ms 708 KB
1
sample-02.txt AC 23 ms 552 KB
1
sample-03.txt AC 17 ms 396 KB
1