結果
問題 | No.516 赤と青の風船 |
ユーザー |
|
提出日時 | 2018-09-25 21:18:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 349 bytes |
コンパイル時間 | 477 ms |
コンパイル使用メモリ | 54,616 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 20:52:52 |
合計ジャッジ時間 | 923 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 6 |
ソースコード
#include <iostream> #include <cstring> #define REP(i, n) for(int i=0; i< (int)(n); i++) using namespace std; int main(void){ int count=0; char str[5]; REP (i, 3){ cin >> str; if(strcmp(str, "BLUE")==0)count++; } if(count >=2){ cout << "BLUE"; }else{ cout << "RED"; } return 0; }