結果

問題 No.516 赤と青の風船
ユーザー RIGIHRIGIH
提出日時 2017-06-23 17:49:07
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 635 ms
コンパイル使用メモリ 56,020 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-14 06:59:45
合計ジャッジ時間 1,251 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,944 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
6,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:13:11: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   13 |         b="BLUE";
      |           ^~~~~~

ソースコード

diff #

#include<stdio.h>
#include <iostream>
#include <cstring>
using namespace std;


int main(){
	

	char a1[10],a2[10],a3[10];
	cin>>a1>>a2>>a3;
	char *b;
	b="BLUE";
	int i=0;
	if(!strcmp(a1,b)) i++;
	if(!strcmp(a2,b)) i++;
	if(!strcmp(a2,b)) i++;
	if(i>1) printf("BLUE\n");
	else printf("RED\n");

	

	
	return 0;
}
0