团体程序设计天梯赛-练习集 L1-015 跟奥巴马一起画方块 (15分)
程序员文章站
2024-02-27 12:23:03
...
#include <iostream>
using namespace std;
int main()
{
int N;
cin >> N;
char c;
cin >> c;
int t = N / 2 + N % 2;
for (int i = 0; i < t; i++)
{
for (int k = 0; k < N; k++)
cout << c;
cout << endl;
}
return 0;
}