Submission

Status:

-----

Subtask/Task Score:

0/100

Score: 0

User: cheeseycheese05

Problemset: กังหันสี่ทิศ

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-13 18:52:35

#include <iostream>
using namespace std;
int main(){
    int n;
    cin >> n;
    int j = 0;
    for(int i = n - 1; i > 0; i--){ cout << string(j, ' ') << (char)('A' + i) << string(2*(i-1), ' ') << ' ' << (char)('A' + i) << string(2*j + n, ' ') << '*' << string(2*(i-1), ' ') << " *" << '\n'; j++;}
    cout << string(j, ' ') << 'A' << string(2*j + n, ' ') << '*' << '\n';
    for(int i = 1; i < n; i++){ j--; cout << string(j, ' ') << (char)('A' + i) << string(2*(i-1), ' ') << ' ' << (char)('A' + i) << string(2*j + n, ' ') << '*' << string(2*(i-1), ' ') << " *" << '\n';}
    return 0;
}