結果

問題 No.570 3人兄弟(その1)
ユーザー suppy193
提出日時 2021-02-06 00:48:58
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 451 bytes
コンパイル時間 796 ms
コンパイル使用メモリ 19,968 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-02 14:43:09
合計ジャッジ時間 1,331 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%d%d%d", &a, &b, &c);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void) {

	int a,b,c;
	scanf("%d%d%d", &a, &b, &c);
	if(a > b && a > c){
		printf("A\n");
		if(b > c){
			printf("B\nC\n");
		}
		else {
			printf("C\nB\n");
		}
	}
	else if(b > a && b > c){
		printf("B\n");
		if(a > c){
			printf("A\nC\n");
		}
		else {
			printf("C\nA\n");
		}
	}
	else if(c > a && c > b){
		printf("C\n");
		if(a > b){
			printf("A\nB\n");
		}
		else {
			printf("B\nA\n");
		}
	}
	else{}

	return 0;
}
0