Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64533 祝家懿 拐角方阵 C++ Wrong Answer 1 MS 276 KB 336 2024-01-21 16:34:36

Tests(0/2):


Code:

#include<iostream> using namespace std; int a[21]; int main() { int a[21]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; int n,x=1,s=0; cin>>n; for(int k=0;k<n;k++){ s=0; for(int i=0;i<k;i++){ cout<<a[s]; s++; } for(int i=0;i<n-s;i++) { cout<<x; } x++; cout<<endl; } return 0; }


Run Info:

------Input------
5
------Answer-----
1 1 1 1 1 1 2 2 2 2 1 2 3 3 3 1 2 3 4 4 1 2 3 4 5
------Your output-----
11111 12222 12333 12344 12345