문제 링크 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5Pq-OKAVYDFAUq


문제의 저작권은 SW Expert Academy에 있습니다.



#include <iostream>
 
using namespace std;
 
int main(void) {
    int T;
    cin >> T;
 
    for(int t_case=0; t_case<T; t_case++) {
        int N;
        cin >> N;
        int array[N][N];
        string line[N];
 
        for(int i=0; i<N; i++)
            line[i] = "";
        
        for(int i=0; i<N; i++)
            for(int j=0; j<N; j++)
                cin >> array[i][j];
 
        for(int j=N-1; j>=0; j--) {
            for(int i=N-1; i>=0; i--) {
                line[j] += to_string(array[i][j]);
            }
        }
 
        for(int i=0; i<N; i++)
            line[i] += " ";
 
        for(int i=N-1; i>=0 ; i--) {
            for(int j=N-1; j>=0; j--) {
                line[N-i-1+= to_string(array[i][j]);
            }
        }
 
        for(int i=0; i<N; i++)
            line[i] += " ";
 
        for(int j=N-1; j>=0; j--) {
            for(int i=0; i<N; i++) {
                line[N-j-1+= to_string(array[i][j]);
            }
        }
 
        cout << "#" << t_case+1 << "\n";
 
        for(int i=0; i<N; i++)
            cout << line[i] << "\n";
    }
 
    return 0;
}
cs

'C & C++ > SW Expert Academy' 카테고리의 다른 글

SWEA 1954 - 달팽이 숫자  (0) 2018.04.28
SWEA 1959 - 두 개의 숫자열  (0) 2018.04.28
SWEA 1970 - 쉬운 거스름돈  (0) 2018.04.28
SWEA 1974 - 스도쿠 검증  (0) 2018.04.28
SWEA 1976 - 시각 덧셈  (0) 2018.04.27

문제 링크 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PsIl6AXIDFAUq


문제의 저작권은 SW Expert Academy에 있습니다.



#include <iostream>
 
using namespace std;
 
int main(void) {
    int T, cnt;
    cin >> T;
 
    for(int t_case=0; t_case<T; t_case++) {
        int money;
        cin >> money;
        cout << "#" << t_case+1 << "\n";
 
        cout << money/50000 << " ";
        money = money%50000;
        cout << money/10000 << " ";
        money = money%10000;
        cout << money/5000 << " ";
        money = money%5000;
        cout << money/1000 << " ";
        money = money%1000;
        cout << money/500 << " ";
        money = money%500;
        cout << money/100 << " ";
        money = money%100;
        cout << money/50 << " ";
        money = money%50;
        cout << money/10 << "\n";
    }
 
    return 0;
}
cs

'C & C++ > SW Expert Academy' 카테고리의 다른 글

SWEA 1959 - 두 개의 숫자열  (0) 2018.04.28
SWEA 1961 - 숫자 배열 회전  (0) 2018.04.28
SWEA 1974 - 스도쿠 검증  (0) 2018.04.28
SWEA 1976 - 시각 덧셈  (0) 2018.04.27
SWEA 1545 - 거꾸로 출력해 보아요  (0) 2018.04.27

https://dev-repository.tistory.com/52

'C & C++ > SW Expert Academy' 카테고리의 다른 글

SWEA 1961 - 숫자 배열 회전  (0) 2018.04.28
SWEA 1970 - 쉬운 거스름돈  (0) 2018.04.28
SWEA 1976 - 시각 덧셈  (0) 2018.04.27
SWEA 1545 - 거꾸로 출력해 보아요  (0) 2018.04.27
SWEA 2019 - 더블더블  (0) 2018.04.27

문제 링크 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PttaaAZIDFAUq


문제의 저작권은 SW Expert Academy에 있습니다.



#include <iostream>
 
using namespace std;
 
int main(void) {
    int T, a[2], b[2], c[2], carry;
    cin >> T;
 
    for(int t_case=0; t_case<T; t_case++) {
        carry = 0;
 
        cin >> a[0>> a[1>> b[0>> b[1];
        c[1= a[1+ b[1];
        if(c[1> 59) {
            carry = 1;
            c[1-= 60;
        }
        c[0= a[0+ b[0+ carry;
        if(c[0> 12) {
            c[0-= 12;
        }
 
        cout << "#" << t_case+1 << " " << c[0<< " " << c[1<< "\n";
    }
 
    return 0;
}
cs

'C & C++ > SW Expert Academy' 카테고리의 다른 글

SWEA 1970 - 쉬운 거스름돈  (0) 2018.04.28
SWEA 1974 - 스도쿠 검증  (0) 2018.04.28
SWEA 1545 - 거꾸로 출력해 보아요  (0) 2018.04.27
SWEA 2019 - 더블더블  (0) 2018.04.27
SWEA 1936 - 1대1 가위바위보  (0) 2018.04.27

문제 링크 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV2gbY0qAAQBBAS0


문제의 저작권은 SW Expert Academy에 있습니다.




#include <iostream>
 
using namespace std;
 
int main(void) {
    int N;
    cin >> N;
 
    for(int i=N; i>0; i--) {
        cout << i << " ";
    }
 
    cout << "0\n";
 
    return 0;
}
cs

'C & C++ > SW Expert Academy' 카테고리의 다른 글

SWEA 1974 - 스도쿠 검증  (0) 2018.04.28
SWEA 1976 - 시각 덧셈  (0) 2018.04.27
SWEA 2019 - 더블더블  (0) 2018.04.27
SWEA 1936 - 1대1 가위바위보  (0) 2018.04.27
SWEA 1933 - 간단한 N 의 약수  (0) 2018.04.27

+ Recent posts