'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 |
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 |
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 |
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 |
문제 링크 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QDEX6AqwDFAUq
문제의 저작권은 SW Expert Academy에 있습니다.
#include <iostream> using namespace std; int main(void) { int N, answer = 1; cin >> N; cout << answer; for(int i=0; i<N; i++) { answer *= 2; cout << " " << answer; } cout << "\n"; return 0; } | cs |
SWEA 1976 - 시각 덧셈 (0) | 2018.04.27 |
---|---|
SWEA 1545 - 거꾸로 출력해 보아요 (0) | 2018.04.27 |
SWEA 1936 - 1대1 가위바위보 (0) | 2018.04.27 |
SWEA 1933 - 간단한 N 의 약수 (0) | 2018.04.27 |
SWEA 1938 - 아주 간단한 계산기 (0) | 2018.04.27 |
문제 링크 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PjKXKALcDFAUq
문제의 저작권은 SW Expert Academy에 있습니다.
#include <iostream> using namespace std; int main(void) { int a, b; char winner; cin >> a >> b; if(a == 1) { if(b == 2) winner = 'B'; else if(b == 3) winner = 'A'; } else if(a == 2) { if(b == 1) winner = 'A'; else if(b == 3) winner = 'B'; } else { if(b == 1) winner = 'B'; else if(b == 2) winner = 'A'; } cout << winner << "\n"; return 0; } | cs |
SWEA 1545 - 거꾸로 출력해 보아요 (0) | 2018.04.27 |
---|---|
SWEA 2019 - 더블더블 (0) | 2018.04.27 |
SWEA 1933 - 간단한 N 의 약수 (0) | 2018.04.27 |
SWEA 1938 - 아주 간단한 계산기 (0) | 2018.04.27 |
SWEA 2025 - N줄덧셈 (0) | 2018.04.27 |