結果

問題 No.516 赤と青の風船
ユーザー 57tggx57tggx
提出日時 2017-05-28 21:24:10
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 558 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 30,568 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-21 14:02:08
合計ジャッジ時間 809 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <stdio.h>

int main(){
	unsigned red = 0, blue = 0;
	if(getchar() == 'R'){
		red++;
		getchar();
		getchar();
		getchar();
	}else{
		blue++;
		getchar();
		getchar();
		getchar();
		getchar();
	}
	if(getchar() == 'R'){
		red++;
		getchar();
		getchar();
		getchar();
	}else{
		blue++;
		getchar();
		getchar();
		getchar();
		getchar();
	}
	if(getchar() == 'R'){
		red++;
		getchar();
		getchar();
		getchar();
	}else{
		blue++;
		getchar();
		getchar();
		getchar();
		getchar();
	}
	if(red > blue) puts("RED\n");
	else puts("BLUE\n");
	return 0;
}
0