結果
| 問題 | No.570 3人兄弟(その1) |
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-10 17:37:27 |
| 言語 | C (gcc 15.2.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 626 bytes |
| 記録 | |
| コンパイル時間 | 135 ms |
| コンパイル使用メモリ | 38,240 KB |
| 最終ジャッジ日時 | 2026-02-22 13:10:15 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 5 |
ソースコード
#include <stdio.h>
void main(void){
int brotherHeight[3] = {0,0,0};
int orderList[3] = {1,2,3};
for(int i = 0 ; i < 3;i++){
scanf("%d",&brotherHeight[i]);
}
for(int i = 0 ; i < 3;i++){
for(int j = i ; j < 3 ; j++){
if(brotherHeight[i] < brotherHeight[j]){
int num = brotherHeight[i];
brotherHeight[i] = brotherHeight[j];
brotherHeight[j] = num;
num = orderList[i];
orderList[i] = orderList[j];
orderList[j] = num;
}
}
}
for(int i = 0 ; i < 3;i++){
if(orderList[i] == 0){
printf("A\n");
}else if(orderList[i] == 1){
printf("B\n");
}else{
printf("C\n");
}
}
}
Maeda