結果
問題 |
No.516 赤と青の風船
|
ユーザー |
![]() |
提出日時 | 2017-08-10 21:21:37 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 326 bytes |
コンパイル時間 | 130 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-12 04:08:26 |
合計ジャッジ時間 | 676 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 3 WA * 3 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%s",s[i]); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ char s[3][6]; int i; int c=0; for(i=0;i<3;i++){ scanf("%s",s[i]); if(s[i][0]=='B'){ c++; } } if(c>2){ printf("BLUE\n"); }else{ printf("RED\n"); } return 0; }