Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: Bune

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-27 14:10:26

#include <iostream>
#include <cmath>
using namespace std;

int main(){
  int n;
  cin >> n;
  
  int rows = 2 * n - 1;
  
  for(int i=0;i<rows;i++){
    for(int j=0;j<rows;j++){
      if(j == i || j == rows-1-i){
        cout << char('A' + abs(n-i-1));
      }
      else{
        cout << " ";
      }
    }
    
    cout << " ";

    for(int j=0;j<rows;j++){
      if(j == i || j == rows-1-i){
        cout << "*";
      }
      else{
        cout << " ";
      }
    }

    cout << '\n';
  }

  return 0;
}