結果

問題 No.571 3人兄弟(その2)
ユーザー subsnsubsn
提出日時 2023-06-19 14:59:26
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 604 ms
コンパイル使用メモリ 27,980 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-09-09 10:12:46
合計ジャッジ時間 1,250 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,380 KB
testcase_01 AC 0 ms
4,380 KB
testcase_02 AC 0 ms
4,388 KB
testcase_03 AC 1 ms
4,384 KB
testcase_04 AC 0 ms
4,384 KB
testcase_05 AC 0 ms
4,384 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 1 ms
4,384 KB
testcase_08 AC 1 ms
4,384 KB
testcase_09 AC 0 ms
4,384 KB
testcase_10 AC 1 ms
4,384 KB
testcase_11 AC 0 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 0 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
int main()
{
	int h1, w1, h2, w2, h3, w3;
	scanf("%d%d\n%d%d\n%d%d",&h1,&w1,&h2,&w2,&h3,&w3);
	h1 = h1 * 100 + (200-w1);
	h2 = h2 * 100 + (200-w2);
	h3 = h3 * 100 + (200-w3);

	for (int i = 3;i--;) {
		if (h1 > h2 && h1 > h3) {
			puts("A");
			h1 = -1;
		}
		if (h2 > h1 && h2 > h3) {
			puts("B");
			h2 = -1;
		}
		if (h3 > h1 && h3 > h2) {
			puts("C");
			h3 = -1;
		}
	}
}
0