結果
| 問題 |
No.712 赤旗
|
| コンテスト | |
| ユーザー |
type_dunsparce
|
| 提出日時 | 2018-11-10 16:54:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 292 bytes |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 22,400 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-24 14:51:27 |
| 合計ジャッジ時間 | 580 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d %d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~~~~
main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%s", flag);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
char flag[60];
int n, m, i, j, ans=0;
scanf("%d %d", &n, &m);
for(i=0; i<n; i++){
scanf("%s", flag);
for(j=0; j<m; j++){
if(flag[j]=='W') ans++;
}
}
printf("%d\n", ans);
return 0;
}
type_dunsparce