1 条题解

  • 0
    @ 2024-12-22 11:04:05

    C++ :

    #include<iostream>
    using namespace std;
    int main()
    {
    	char s[10][3][3] = {{{' ','_',' '}, {'|',' ','|'}, {'|','_','|'}},
    						{{' ',' ',' '}, {' ',' ','|'}, {' ',' ','|'}},
    						{{' ','_',' '}, {' ','_','|'}, {'|','_',' '}},
    						{{' ','_',' '}, {' ','_','|'}, {' ','_','|'}},
    						{{' ',' ',' '}, {'|','_','|'}, {' ',' ','|'}},
    						{{' ','_',' '}, {'|','_',' '}, {' ','_','|'}},
    						{{' ','_',' '}, {'|','_',' '}, {'|','_','|'}},
    						{{' ','_',' '}, {' ',' ','|'}, {' ',' ','|'}},
    						{{' ','_',' '}, {'|','_','|'}, {'|','_','|'}},
    						{{' ','_',' '}, {'|','_','|'}, {' ','_','|'}}
    					   };
    	int a[4];
    	while (cin>>a[0]>>a[1]>>a[2]>>a[3])
    	{
    		for (int i=0; i<3; i++)	//分3行输出
    		{
    			for (int j=0; j<4; j++)	//每次输出4个数字的部分
    				for (int k=0; k<3; k++) cout<<s[a[j]][i][k];
    			cout<<endl;
    		}
    	}
    }
    
    • 1

    信息

    ID
    347
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者