본문 바로가기

전체 글1543

2023 09 회고.. 현재는 모 그룹사의 IT 학원에서 강사로 활동중입니다... 그동안 알고리즘 , SQL 문제는 저작권등의 문제로 올리지 못해 빠른시일내에 해결해 올려보도록 노력하겠습니다 ㅠㅠ 학원에서 수강생분들을 가르치며 많이 느낀점은 학력이나 전공유무도 중요하지만 그게 못지 않게 열정이 되게 중요하다는걸 많이 체득합니다. 실제로 문제를 풀어도 대학생분들이 잘 풀 것같지만서도 직장인분들, 초등,중학교 학생분들이 더 잘푸는 경향도 보이네요 환절기 독감, 코로나 조심하시고 다들 건강하시길 바랍니다. 김두칠 드림. 2023. 10. 18.
백준 2751 수 정렬하기 2 링크 : https://www.acmicpc.net/problem/2751 2751번: 수 정렬하기 2 첫째 줄에 수의 개수 N(1 ≤ N ≤ 1,000,000)이 주어진다. 둘째 줄부터 N개의 줄에는 수가 주어진다. 이 수는 절댓값이 1,000,000보다 작거나 같은 정수이다. 수는 중복되지 않는다. www.acmicpc.net 1 2 3 4 5 6 7 8 9 10 11 ㅔㅛimport sys if __name__ == '__main__': n = int(sys.stdin.readline()) ans = [0] * 2000001 for i in range(n): ans[int(sys.stdin.readline())+1000000] = 1 for i in range(2000001): if ans[i] !.. 2023. 9. 12.
백준 28444 HI-ARC=? 링크 : https://www.acmicpc.net/problem/28444 28444번: HI-ARC=? 첫째 줄에 각 문자에 들어갈 값 $H, I, A, R, C$ ($0 \leq H,I,A,R,C \leq 100$, $H,I,A,R,C$는 정수) 가 공백을 사이에 두고 순서대로 주어진다. www.acmicpc.net 1 2 3 4 5 6 7 8 def sol(nums): return nums[0] * nums[1] - nums[2] * nums[3] * nums[4] if __name__ == '__main__': nums = list(map(int, input().split())) print(sol(nums)) Colored by Color Scripter cs 사용된 알고리즘 : X 리스트로 입.. 2023. 9. 12.
백준 28701 세제곱의 합 링크 : https://www.acmicpc.net/problem/28701 28701번: 세제곱의 합 $a$의 제곱은 $a$를 두 번 곱한 수로, $a^2$으로 표현합니다. $a^2 = a \times a$입니다. 또한, $a$의 세제곱은 $a$를 세 번 곱한 수로, $a^3$으로 표현합니다. $a^3 = a \times a \times a$ 입니다. www.acmicpc.net 1 2 3 4 5 6 7 def sol(n): print(n*(n+1)//2) print((n*(n+1)//2)**2) print((n*(n+1)//2)**2) if __name__ == '__main__': n = int(input()) sol(n) cs 사용된 알고리즘 : X 알고리즘 보다 수학적 정의를 내리시는게 조금 더.. 2023. 9. 12.
백준 2393 Rook 링크 : https://www.acmicpc.net/problem/2393 2393번: Rook The rook art, exactly as shown below, with no extra blank spaces. In particular, a line must not end with a blank space. www.acmicpc.net 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 def sol(): print(" ___ ___ ___") print(" | |__| |__| |") print(" | |") print(" \\_________/") print(" \\_______/") print(" | |") print(" | |") print(" | |") print(" .. 2023. 9. 12.
백준 28235 코드마스터 2023 링크 : https://www.acmicpc.net/problem/28235 28235번: 코드마스터 2023 송도고등학교에서 주최하는 첫 중고등학생 대상 알고리즘 대회, "코드마스터 2023"이 열렸다! 이 대회가 중고등학생들에게 인기 있는 알고리즘 대회이자 오프라인 이벤트로서 자리매김할 수 있 www.acmicpc.net 사용된 알고리즘 : X 간단한 입력 후 출력 입니다. 딕셔너리를 사용했습니다! 1 2 3 4 5 6 7 8 9 10 11 12 def sol(guho): guhos ={ 'SONGDO':'HIGHSCHOOL', 'CODE': 'MASTER', '2023': '0611', 'ALGORITHM': 'CONTEST' } return guhos[guho] if __name__ == '__m.. 2023. 9. 11.
leetcode 2798. Number of Employees Who Met the Target https://leetcode.com/problems/number-of-employees-who-met-the-target/description/ Number of Employees Who Met the Target - LeetCode Can you solve this real interview question? Number of Employees Who Met the Target - There are n employees in a company, numbered from 0 to n - 1. Each employee i has worked for hours[i] hours in the company. The company requires each employee to work for leetcode.c.. 2023. 8. 4.
leetcode 2744. Find Maximum Number of String Pairs https://leetcode.com/problems/find-maximum-number-of-string-pairs/description/ Find Maximum Number of String Pairs - LeetCode Can you solve this real interview question? Find Maximum Number of String Pairs - You are given a 0-indexed array words consisting of distinct strings. The string words[i] can be paired with the string words[j] if: * The string words[i] is equal to the rev leetcode.com 1 .. 2023. 7. 13.
leetcode 2769. Find the Maximum Achievable Number https://leetcode.com/problems/find-the-maximum-achievable-number/description/ - LeetCode Can you solve this real interview question? - You are given two integers, num and t. An integer x is called achievable if it can become equal to num after applying the following operation no more than t times: * Increase or decrease x by 1, and simultaneou leetcode.com 1 2 3 class Solution: def theMaximumAch.. 2023. 7. 13.
leetcode 2739. Total Distance Traveled https://leetcode.com/problems/total-distance-traveled/description/ Total Distance Traveled - LeetCode Can you solve this real interview question? Total Distance Traveled - A truck has two fuel tanks. You are given two integers, mainTank representing the fuel present in the main tank in liters and additionalTank representing the fuel present in the addition leetcode.com 1 2 3 4 5 6 7 8 9 10 11 12.. 2023. 7. 7.
leetcode 2651. Calculate Delayed Arrival Time https://leetcode.com/problems/calculate-delayed-arrival-time/description/ Calculate Delayed Arrival Time - LeetCode Can you solve this real interview question? Calculate Delayed Arrival Time - You are given a positive integer arrivalTime denoting the arrival time of a train in hours, and another positive integer delayedTime denoting the amount of delay in hours. Return leetcode.com 1 2 3 class S.. 2023. 7. 6.
leetcode 2544. Alternating Digit Sum https://leetcode.com/problems/alternating-digit-sum/description/ Alternating Digit Sum - LeetCode Can you solve this real interview question? Alternating Digit Sum - You are given a positive integer n. Each digit of n has a sign according to the following rules: * The most significant digit is assigned a positive sign. * Each other digit has an opposit leetcode.com 1 2 3 4 5 6 7 8 9 10 11 class .. 2023. 7. 3.