diff --git "a/09\354\233\22421\354\235\274/\354\264\210\354\244\221\352\270\211/.project" "b/09\354\233\22421\354\235\274/\354\264\210\354\244\221\352\270\211/.project" index 605c1c1..c3e52d4 100644 --- "a/09\354\233\22421\354\235\274/\354\264\210\354\244\221\352\270\211/.project" +++ "b/09\354\233\22421\354\235\274/\354\264\210\354\244\221\352\270\211/.project" @@ -14,4 +14,15 @@ org.eclipse.jdt.core.javanature + + + 1667983548442 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git "a/09\354\233\22421\354\235\274/\354\264\210\354\244\221\352\270\211/bin/.gitignore" "b/09\354\233\22421\354\235\274/\354\264\210\354\244\221\352\270\211/bin/.gitignore" deleted file mode 100644 index 2a21ce4..0000000 --- "a/09\354\233\22421\354\235\274/\354\264\210\354\244\221\352\270\211/bin/.gitignore" +++ /dev/null @@ -1,2 +0,0 @@ -/BOJ_11057.class -/BOJ_2110.class diff --git "a/11\354\233\22402\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_1712.cpp" "b/11\354\233\22402\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_1712.cpp" new file mode 100644 index 0000000..f6a1feb --- /dev/null +++ "b/11\354\233\22402\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_1712.cpp" @@ -0,0 +1,18 @@ +#include + +//input: A(고정비용), B(per 가변비용), C(per 가격), output: 손익분기점(break-even point) + +int main(void){ + int A, B, C, output; + scanf("%d %d %d", &A, &B, &C); + + if(C>B){ + output = A/(C-B); + printf("%d\n", output+1); + } + else{ + printf("-1\n"); + } + return 0; + +} \ No newline at end of file diff --git "a/11\354\233\22402\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_2477.py" "b/11\354\233\22402\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_2477.py" new file mode 100644 index 0000000..4106313 --- /dev/null +++ "b/11\354\233\22402\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_2477.py" @@ -0,0 +1,25 @@ +import sys + +input = sys.stdin.readline + +if __name__ == '__main__': + k = int(input()) + info = [] + width = [] + height = [] + + for _ in range(6): + dir, length = map(int, input().split()) + info.append(length) + if dir > 2: + height.append(length) + else: + width.append(length) + + big_square = max(width) * max(height) + max_width_index = info.index(max(width)) + max_height_index = info.index(max(height)) + small_square = abs(info[(max_width_index - 1) % 6] - info[(max_width_index + 1) % 6]) * abs( + info[(max_height_index - 1) % 6] - info[(max_height_index + 1) % 6]) + area = big_square - small_square + print(area * k) diff --git "a/11\354\233\22409\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_5545.py" "b/11\354\233\22409\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_5545.py" new file mode 100644 index 0000000..e8300e9 --- /dev/null +++ "b/11\354\233\22409\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_5545.py" @@ -0,0 +1,31 @@ +import sys + +input = sys.stdin.readline + +def calPizzaCalPerWon(toppings_cal, a_cost, b_cost, c_cal): + cost = a_cost + b_cost * len(toppings_cal) + cal = c_cal + sum(toppings_cal) + return cal / cost + + +if __name__ == '__main__': + #input + n = int(input()) + a_cost, b_cost = map(int, input().split()) + c_cal = int(input()) + topping_cal = [] + for _ in range(n): + topping_cal.append(int(input())) + + #값이 크게 나오게 하려면 calorie가 큰 것부터 더해야 하기 떄문에 sort해줌 + topping_cal.sort(reverse=True) + + max = 0 + for i in range(n + 1): #topping 개수가 0 ~ n일 떄의 모든 경우의 수 고려 + val = calPizzaCalPerWon(topping_cal, a_cost, b_cost, c_cal) + max = val if val > max else max #기존 max 값보다 클 경우에만 max 값 업데이트해주기 + try: + topping_cal.pop() #topping 개수를 1개씩 지우기 (calorie가 가장 작은 거) + except: + continue + print(int(max)) #소수점 버린 형태로 print해주기 diff --git "a/11\354\233\22409\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_7983.py" "b/11\354\233\22409\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_7983.py" new file mode 100644 index 0000000..1e20a71 --- /dev/null +++ "b/11\354\233\22409\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_7983.py" @@ -0,0 +1,23 @@ +import sys + +input = sys.stdin.readline + +if __name__ == '__main__': + n = int(input()) + assignment = [] + + for i in range(n): + di, ti = map(int, input().split()) + assignment.append([di, ti]) + + assignment = sorted(assignment, key=lambda x: x[1]) #과제 마감일 기준으로 sort 해주기 + + startDay = assignment[0][1] - assignment[0][0] #과제를 시작해야 하는 날짜 + temp = assignment[0][1] #과제를 다했을 때 되는 날짜 + for i in range(1, n): + temp += assignment[i][0] + if temp > assignment[i][1]: #과제를 완료한 날짜가 마감일보다 늦다면 + #시작 날짜를 앞당긴다 + startDay -= temp - assignment[i][1] + temp -= temp - assignment[i][1] + print(startDay) diff --git "a/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_2246.py" "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_2246.py" new file mode 100644 index 0000000..e7bb046 --- /dev/null +++ "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_2246.py" @@ -0,0 +1,32 @@ +import sys + +input = sys.stdin.readline + +if __name__ == '__main__': + n = int(input()) + condos = {} + + d_candidates = set() # 1번째 조건에만 부합하는 후보들 + c_candidates = set() # 2번쨰 조건에만 부합하는 후보들 + + for _ in range(n): + d, c = map(int, input().split()) + try: + condos[d] = min(condos[d], c) # 2번쨰 조건에 의해 만약 거리가 같은 콘도가 있다면, 가장 숙박비가 싼 콘도만 후보가 될 수 있다. + except KeyError: + condos[d] = c + + d_condos = sorted(condos.items(), key=lambda x: x[0]) # 거리 중심으로 정렬한 콘도 배열 + c_condos = sorted(condos.items(), key=lambda x: x[1]) # 숙박비 중심으로 정렬한 콘도 배열 + + minCost, minDistance = 100000, 100000 + for condo in d_condos: # 1번째 조건에 부합하는 후보들을 찾는 for문 + if condo[1] < minCost: + d_candidates.add(condo) + minCost = min(condo[1], minCost) + for condo in c_condos: # 2번째 조건에 부합하는 후보들을 찾는 for문 + if condo[0] < minDistance: + c_candidates.add(condo) + minDistance = min(condo[0], minDistance) + + print(len(d_candidates.intersection(c_candidates))) # 1번째 & 2번쨰 조건 부합하는 후보들의 숫자 출력 diff --git "a/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_4436.py" "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_4436.py" new file mode 100644 index 0000000..4d95011 --- /dev/null +++ "b/11\354\233\22416\354\235\274/\354\264\210\354\244\221\352\270\211/2017032_4436.py" @@ -0,0 +1,22 @@ +import sys + +input = sys.stdin.readline + + +def cal_k(n): + cnt = 1 + nums = set() + all = set([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) + while len(all.difference(nums)): + nums = nums.union(set(map(int, list(str(cnt * n))))) + cnt += 1 + return cnt - 1 + + +if __name__ == '__main__': + try: + while True: + n = int(input()) + print(cal_k(n)) + except: + exit(0) diff --git "a/\354\244\221\352\260\204\352\263\240\354\202\254/2017032_1038.py" "b/\354\244\221\352\260\204\352\263\240\354\202\254/2017032_1038.py" new file mode 100644 index 0000000..e69de29 diff --git "a/\354\244\221\352\260\204\352\263\240\354\202\254/2017032_1063.py" "b/\354\244\221\352\260\204\352\263\240\354\202\254/2017032_1063.py" new file mode 100644 index 0000000..e69de29