結果

問題 No.570 3人兄弟(その1)
ユーザー 132106k
提出日時 2017-11-18 17:12:12
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 486 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 54,420 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-25 11:52:47
合計ジャッジ時間 997 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
int main() {
	int A, B, C;;
	cin >> A;
	cin >> B;
	cin >> C;
	char res[3] = { 'A','B','C' };
	int t;
	if (A < B) {
		t = B;
		B = A;
		A = t;
		t = res[1];
		res[1] = res[0];
		res[0] = t;
	}
	if (B < C) {
		t = C;
		C = B;
		B = t;
		t = res[2];
		res[2] = res[1];
		res[1] = t;
	}
	if (A < B) {
		t = B;
		B = A;
		A = t;
		t = res[1];
		res[1] = res[0];
		res[0] = t;
	}
	for (int i = 0; i < 3; i++) {
		cout << res[i] << endl;
	}
	return 0;
}
0