Skip to content

Commit

Permalink
Summary
Browse files Browse the repository at this point in the history
  • Loading branch information
witheunjin committed Mar 25, 2020
1 parent e6b81d1 commit 0d3f979
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
7 changes: 7 additions & 0 deletions BaekJoon/10871_X보다작은수.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//10871_X보다 작은 수
/*
전체 아이디어
- 수열의 원소를 받을 때마다 X와의 대소관계 비교 후
작은 경우 해당 원소 바로 출력
*/

#include <iostream>
using namespace std;

Expand Down
8 changes: 8 additions & 0 deletions BaekJoon/2839_설탕배달.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
//2839_설탕배달
/*
전체 아이디어
- 구해야 하는 건 a+b의 최솟값.
5kg 봉지의 개수를 a, 3kg 봉지의 개수를 b라고 가정했을 때 같은 무게일 때 a가 클수록 a+b의 합이 작다.
5a+3b = N이라는 중복조합문제를 풀 때 가능한 a의 최대값을 먼저 구하는 것처럼
우선 가능한 최대 a값을 구하고 (five) 나머지 값이 3으로 나눠지면 a+b값을 반환하고
나누어떨어지지 않는다면 문제의 조건에 따라 -1을 반환한다. */
#include <iostream>
using namespace std;

Expand Down
9 changes: 8 additions & 1 deletion BaekJoon/9498_시험성적.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
//9898_시험성적
/*
전체 아이디어
입력된 점수의 십의 자리수를 ten변수에 저장한 후
점수대에 따라 해당 성적을 반환하는 함수 grade를 작성
*/

#include <iostream>
using namespace std;

char grade(int score) {
int ten = score/10;
int ten = score/10; //십의 자리수 구함
if(ten == 10 || ten == 9) return 'A';
if(ten == 8) return 'B';
if(ten == 7) return 'C';
Expand Down
13 changes: 13 additions & 0 deletions BaekJoon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ https://www.acmicpc.net/
|**10872**|**팩토리얼**|2020.03.15|1|
|**10039**|**평균 점수**|2020.03.15|1|
|**2490**|**윷놀이**|2020.03.15|1|
|**2557**|**Hello World**|2020.03.26|1|
|**10718**|**We love kriii**|2020.03.26|1|
|**10171**|**고양이**|2020.03.26|1|
|**10172**|****|2020.03.26|1|
|**1000**|**A+B**|2020.03.26|1|
|**1001**|**A-B**|2020.03.26|1|
|**10998**|**A\*B**|2020.03.26|1|
|**1008**|**A/B**|2020.03.26|5|
|**10869**|**사칙연산**|2020.03.26|1|
|****|****|||
|****|****|||
|****|****|||
|****|****|||
|****|****|||
|****|****|||
|****|****|||

0 comments on commit 0d3f979

Please sign in to comment.