結果

問題 No.712 赤旗
ユーザー focusfocus
提出日時 2018-07-21 20:57:58
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 272 bytes
コンパイル時間 567 ms
コンパイル使用メモリ 71,956 KB
実行使用メモリ 5,012 KB
最終ジャッジ日時 2023-08-27 00:46:06
合計ジャッジ時間 1,113 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: 関数 ‘int main()’ 内:
main.cpp:8:14: 警告: ‘ch’ may be used uninitialized [-Wmaybe-uninitialized]
    8 |         char ch;
      |              ^~

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
using namespace std;
int main(){
	int x,y,ans=0;
	char ch;
	cin >> x >> y;
	for(int i=0;i<y;i++){
		for(int j=0;j<x;j++){
			cout << ch;
			if(ch=='W')	ans++;
		}
	}
	cout << ans << endl;
	return 0;
}
0