Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
437319 黄浙峰老师 【C3-4】输出字母矩形Ⅱ C++ 解答错误 0 1 MS 244 KB 329 2026-04-22 19:00:54

Tests(0/2):


#include<iostream> using namespace std; int main(){ char a; cin>>a; int n=a-'A'+1; for(int i=1;i<=n;i++){ for(int j=1;j<=i-1;j++){ cout<<" "; } for(int j=n-i+1;j>=1;j--){ cout<<(char)('A'+j-1); } for(int j=1;j<=n-i;j++){ cout<<(char)('B'+j-1); } cout<<endl; } return 0; }


测评信息: