結果
問題 | No.712 赤旗 |
ユーザー | card_board01 |
提出日時 | 2018-09-24 21:45:01 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 320 bytes |
コンパイル時間 | 106 ms |
コンパイル使用メモリ | 23,208 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-24 16:30:36 |
合計ジャッジ時間 | 669 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 1 ms
4,348 KB |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d", &N); scanf("%d", &M); | ~~~~~^~~~~~~~~~ main.cpp:6:28: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d", &N); scanf("%d", &M); | ~~~~~^~~~~~~~~~
ソースコード
#include <stdio.h> int main (void) { int N, M; int counter = 0; scanf("%d", &N); scanf("%d", &M); char s[N][M]; for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { if (s[i][j] = 'W') counter++; } } printf("%d\n", counter); return 0; }