一本通1028

//qf
#include 
#define f(i,j,n) for(register int i=j;i<=n;i++)
using namespace std;
typedef long long ll;
inline ll read() {
	ll x=0;
	int f=1;
	char ch=getchar();
	while(!isdigit(ch)) {
		if(ch=='-') f=-1;
		ch=getchar();
	}
	while(isdigit(ch)) x=(x<<1)+(x<<3)+(ch-48),ch=getchar();
	return x*f;
}
const int n=5;
signed main() {
	char ch=getchar();
	f(i,1,n){
		f(j,1,(n-i)>>1) putchar(' ');
		f(j,1,i) putchar(ch);
		i++,puts("");
	}
	putchar(' '),putchar(ch),putchar(ch),putchar(ch),puts("");
	putchar(' '),putchar(' '),putchar(ch),puts("");
	return 0;
}

 

转载于:https://www.cnblogs.com/qf-breeze/p/10667612.html

你可能感兴趣的:(一本通1028)