1 条题解

  • 2
    @ 2022-10-6 10:57:54
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    int n;
    cin>>n;
    if(n==1)cout<<1<<endl;
    if(n==2) {
    cout<<11<<endl;
    cout<<22<<endl;
    }
    if(n==3) {
    cout<<111<<endl;
    cout<<222<<endl;
    cout<<333<<endl;
    }
    if(n==4) {
    cout<<1111<<endl;
    cout<<2222<<endl;
    cout<<3333<<endl;
    cout<<4444<<endl;
    }
    if(n==5){
    cout<<11111<<endl;
    cout<<22222<<endl;
    cout<<33333<<endl;
    cout<<44444<<endl;
    cout<<55555<<endl;
    }
    if(n==6){
    cout<<111111<<endl;
    cout<<222222<<endl;
    cout<<333333<<endl;
    cout<<444444<<endl;
    cout<<555555<<endl;
    cout<<666666<<endl;
    }
    if(n==7){
    cout<<1111111<<endl;
    cout<<2222222<<endl;
    cout<<3333333<<endl;
    cout<<4444444<<endl;
    cout<<5555555<<endl;
    cout<<6666666<<endl;
    cout<<7777777<<endl;
    }
    if(n==8){
    cout<<11111111<<endl;
    cout<<22222222<<endl;
    cout<<33333333<<endl;
    cout<<44444444<<endl;
    cout<<55555555<<endl;
    cout<<66666666<<endl;
    cout<<77777777<<endl;
    cout<<88888888<<endl;
    }
    if(n==9){
    cout<<111111111<<endl;
    cout<<222222222<<endl;
    cout<<333333333<<endl;
    cout<<444444444<<endl;
    cout<<555555555<<endl;
    cout<<666666666<<endl;
    cout<<777777777<<endl;
    cout<<888888888<<endl;
    cout<<999999999<<endl;
    }
    return 0;
    }
    

    土方法😄

    • 1

    信息

    ID
    1097
    时间
    1000ms
    内存
    256MiB
    难度
    4
    标签
    递交数
    42
    已通过
    19
    上传者