Submission
Status:
-----
Subtask/Task Score:
0/100
Score: 0
User: goine
Problemset: กังหันสี่ทิศ
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-11 21:13:56
#include<bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int c;
cin >> c;
int left = 0;
int right = (c * 2) - 1;
string x = "";
for (int i = 0; i<(right*2)+c + 1; ++i) {
x += ' ';
}
x += '\0';
int i = c - 1;
while (right > 0) {
string y = x;
y[left] = abs(i) + 'A';
y[right - 1] = abs(i) + 'A';
y[(c * 5) - left - 1] = '*';
y[(c * 5) - right] = '*';
cout << y << endl;
i--;
left++;
right--;
}
return 0;
}