题解 | #字符金字塔#

字符金字塔

https://ac.nowcoder.com/acm/problem/22209

interesting

#include<bits/stdc++.h>
using namespace std;
int main(){
    int c=getchar();
    for(int i='A';i<=c;i++){
        for(int j=1;j<=c-i;j++) putchar(' ');
        for(int j='A';j<=i;j++) putchar(j);
        for(int j=i-1;j>='A';j--) putchar(j);
        putchar('\n');
    }
    return 0;
}
全部评论

相关推荐

07-10 13:59
门头沟学院 Java
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-09 12:10
直接上图
牛客13578115...:改得一般,不值80
点赞 评论 收藏
分享
Lorn的意义:你这标个前端是想找全栈吗?而且项目确实没什么含金量,技术栈太少了,边沉淀边找吧 现在学院本想就业好一点四年至少得高三模式两年加油吧
点赞 评论 收藏
分享
评论
4
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务