1 해설

  • 0
    @ 2026-3-9 21:56:01
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int n, m;
    	cin >> n >> m;
    	int a[105][105], at[105][105];
    	for(int i = 0;i < n;i++){
    		for(int j = 0;j < m;j++){
    			cin >> a[i][j];
    		}
    	}
    	for(int i = 0;i < m;i++){
    		for(int j = 0;j < n;j++){
    			at[i][j] = a[j][i];
    		}
    	}
    	for(int i = 0;i < m;i++){
    		for(int j = 0;j < n;j++){
    			cout << at[i][j] << " ";
    		}
    		cout << endl;
    	}
    	return 0;
    }
    
    • 1

    정보

    ID
    130
    시간
    1000ms
    메모리
    256MiB
    난이도
    6
    태그
    제출 기록
    154
    맞았습니다.
    43
    아이디