結果
問題 | No.712 赤旗 |
ユーザー |
![]() |
提出日時 | 2018-09-15 10:29:10 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 643 bytes |
コンパイル時間 | 1,496 ms |
コンパイル使用メモリ | 29,952 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-08 13:20:55 |
合計ジャッジ時間 | 702 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
// wの数を数えるプログラム#include<stdio.h>#include<math.h>int main(void){char flag[51][51]; //int n,m; // n行m列の旗int i,j;//char color; //旗色の入力値int whitecount = 0; //白旗の数scanf("%d",&n);scanf("%d",&m);//入力値確認用// printf("n = %d , m = %d\n",n,m);for(i = 0; i < n; i++){scanf("%s",flag[i]);for(j = 0; j < m; j++){//flag[i][j] = getchar();if(flag[i][j] == 'W'){whitecount += 1;}//進行確認用//printf("i = %d , j = %d\n",i,j);}// flag[i][m] = '\0'; //文字列の最後は必要}printf("%d\n",whitecount);return 0;}