#include <stdio.h> #include <math.h> int main() { char c; scanf("%c", &c); int x = 5 / 2, y = 5 / 2; for (int i = 0; i < 5; i ++ ) { for (int j = 0; j < 5; j ++ ) { if (abs(i - x) + abs(j - y) <= 5 / 2) // 曼哈顿距离 printf("%c", c); else printf(" "); } printf("\n"); } return 0; }