Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: Sol2468

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

Language: cpp

Time: 0.005 second

Submitted On: 2026-10-14 11:25:52

#include <bits/stdc++.h>
using namespace std;

int n ;

int main(){
    ios_base::sync_with_stdio(false) ;
    cin.tie(NULL) ;
    cin >> n ;
    for(int i=0 ; i<n-1 ; i++){
        string temp1(i,' ') ;
        string temp2(((n-2)*2)+1-(i*2),' ') ;
        cout << temp1 << char(65+n-i-1) << temp2 << char(65+n-i-1) << " " << temp1 << temp1 << "*" << temp2 << "*" << "\n" ;
    }
    string temp(n-1,' ') ;
    cout << temp << 'A' << temp << " " << temp << '*' << "\n" ;
    for(int i=n-2 ; i>=0 ; i--){
        string temp1(i,' ') ;
        string temp2(((n-2)*2)+1-(i*2),' ') ;
        cout << temp1 << char(65+n-i-1) << temp2 << char(65+n-i-1) << " " << temp1 << temp1 << "*" << temp2 << "*" << "\n" ;
    }
    return 0 ;
}