Asa's Website

A - Print a Rectangle

cpaojitp1

最終更新日

Table of Contents

Loading...

問題

https://onlinejudge.u-aizu.ac.jp/courses/lesson/2/ITP1/5/ITP1_5_A

問題文

たて HH x よこ WW の長方形を書いてね。
H=W=0H = W = 0 なら終了。

制約

サンプル

I/O 1

3 4 5 6 2 2 0 0
#### #### #### ###### ###### ###### ###### ###### ## ##

考察

やるだけ。

コード

https://onlinejudge.u-aizu.ac.jp/status/users/a01sa01to/submissions/1/ITP1_5_A/judge/6312152/C++17

int main() { while (true) { int h, w; cin >> h >> w; if (h == 0 && w == 0) break; rep(i, h) { rep(j, w) cout << "#"; cout << endl; } cout << endl; } return 0; }