본문 바로가기
반응형

백준34

백준 알고리즘 10950번 A+B-3 c++ 요약 : CASE 값만큼 반복해서 두 수의 더한 값을 출력한다. 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int C,a,b; cin >> C; int swap = C; while(C--) { cin >> a >> b; cout 2020. 12. 4.
백준 알고리즘 2739번 구구단 c++ 요약 : N을 입력 후 해당 값의 구구단을 출력하는 문제이다. 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a; cin >> a; for(int i=1;i 2020. 12. 4.
백준 알고리즘 2884번 알람 시계 c++ 요약 : 시간과 분을 입력받으면 -45분 한 시간을 출력하는 문제 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a,b; cin >> a >> b; if(a!=0) { if(b 2020. 12. 3.
백준 알고리즘 14681번 사분면 고르기 c++ 요약 : x와 y 입력 후 해당 좌표가 몇 사분면인지 확인하는 문제 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a,b; cin >> a >> b; if(a>0&&b>0) cout 2020. 12. 3.
백준 알고리즘 2753번 윤년 c++ 요약 : 년도 입력 후 이 년도가 윤년인지 아닌지 확인하는 문제 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a; cin >> a; if(a%4==0) { if(a%400==0) cout 2020. 12. 3.
백준 알고리즘 9498번 시험 성적 c++ 요약 : 시험 점수를 입력받고 점수에 따라서 학점을 매긴다. 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a; cin >> a; a = a/10; if(a==10||a==9) cout 2020. 12. 3.
백준 알고리즘 1330번 두 수 비교하기 c++ 요약 : 두 수의 값을 비교하여 >, > a >> b; if(a>b) cout 2020. 12. 3.
백준 알고리즘 2588번 곱셈 c++ 요약 : A와 B 입력 후 두 수의 곱셈 과정을 출력 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a,b; cin >> a >> b; cout 2020. 12. 3.
백준 알고리즘 10430번 나머지 c++ 요약 : A, B, C의 값 입력 후 연산 값 출력 소스코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include using namespace std; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a,b,c; cin >> a >> b >> c; cout 2020. 12. 3.
반응형