結果

問題 No.570 3人兄弟(その1)
ユーザー tmsbtmsb
提出日時 2018-11-02 00:42:40
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 460 bytes
コンパイル時間 1,001 ms
コンパイル使用メモリ 28,928 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-30 14:38:09
合計ジャッジ時間 1,504 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
6,940 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(void)
{
    int persons[3], temp, i, j;
    int pos[3] = {1, 2, 3};

    for(i = 0; i < 3; i++){
      scanf("%d", &persons[i]);
    }
    for(i = 0; i < 2; i++){
      for(j = i + 1; j < 3; j++){
        if(persons[pos[j]] > persons[pos[i]]){
          temp = pos[i];
          pos[i] = pos[j];
          pos[j] = temp;
        }
      }
    }
    for(i = 0; i < 3; i++){
      printf("%c\n", pos[i] + 64);
    }

    return 0;
}
0