https://pintia.cn/problem-sets/994805046380707840/problems/994805145370476544
#include<bits/stdc++.h>
using namespace std;
int main(){
double n;
int t;
cin>>n;
char ss;
cin>>ss;
t = (int)n;
n += 1;
n = n/2;
int x = (int)sqrt(n);
for(int i=0; i<x-1; i++){
for(int j=0; j<i; j++)
cout<<" ";
for(int j=0; j<(x-i)*2-1; j++)
cout<<ss;
cout<<endl;
}
for(int i=0; i<x; i++){
for(int j=0; j<x-i-1; j++)
cout<<" ";
for(int j=0; j<(i+1)*2-1; j++)
cout<<ss;
cout<<endl;
}
int more = t-(1+2*x-1)*x+1;
cout<<more<<endl;
return 0;
}