結果

問題 No.516 赤と青の風船
ユーザー funakoshi
提出日時 2019-08-20 15:49:21
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 459 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 30,208 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-06 12:27:06
合計ジャッジ時間 811 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
int main(void)
{
    char rorb[5]="";
    int red=0,blue=0;
    for(int i=0;i<3;i++)
    {
        scanf("%s",rorb);
        if(strcmp(rorb,"RED")==0)
        {
            red++;
        }
        else
        {
            blue++;
        }
        
    }
    if(red>blue)
    {
        printf("RED");
    }
    else
    {
        printf("BLUE");
    }
    
}
0