20分cpp求解
查看原帖
20分cpp求解
1133505
20130303zjl楼主2023/12/31 15:41

详见

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,temp=0;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        for(int j=n-i;j<n;j++)
        {
            temp++;
            if(temp<10)
                cout<<0<<temp;
            else
                cout<<temp;
        }
        cout<<endl;
    }
    return 0;
}
2023/12/31 15:41
加载中...