Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: helloskibidi
Problemset: กังหันสี่ทิศ
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-21 22:09:04
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, count=1;
cin >> n;
string alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for(int i=0;i<=2*(n-1);i++){
for(int j=0;j<=4*n-2;j++){
if(j<(4*n-2)/2){
if(i == j || (i+j)%(2*(n-1)) == 0){
if((n-i-1) < 0) cout << alphabet[-(n-i-1)];
else cout << alphabet[n-i-1];
}
else cout << ' ';
}
else if (j>(4*n-2)/2){
if(j-i == (4*n)/2 || i+j == 4*n-2) cout << '*';
else cout << ' ';
}
else cout << ' ';
}
cout << endl;
}
}