Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
326717 黄浙峰老师 【C5-T】古风排版 C++ 通过 100 67 MS 264 KB 418 2025-06-14 14:36:33

Tests(10/10):


#include<iostream> #include<cstring> using namespace std; int main(){ int n; cin>>n; getchar();//间隔符 string s; getline(cin,s); int x=n;//行数 int y=s.size()/n+(s.size()%n>0);//不能整除再加一列 for(int i=0;i<x;i++){//四行 for(int j=0;j<y;j++){//五列 int z=x*(y-j-1)+i; if(z<s.size()) cout<<s[z]; else cout<<' '; } cout<<endl; } return 0; }


测评信息: