본문 바로가기

분류 전체보기1523

백준 30033 Rust Study https://www.acmicpc.net/problem/30033 30033번: Rust Study 첫 번째 줄에는 임스가 계획하고 공부한 일수 $N$이 주어진다. $(1 \le N \le 1\,000)$ 두 번째 줄에는 임스가 공부하고자 계획한 페이지 수 $A_1$, $A_2$, $\cdots$, $A_N$가 공백으로 구분되어 주어진다. $(1 \le www.acmicpc.net 1234567891011121314def solution(a, b): answer = 0 for an, bn in zip(a,b): if an 2023. 11. 16.
백준 29766 DKSH 찾기 https://www.acmicpc.net/problem/29766 29766번: DKSH 찾기 첫째 줄에 문자열이 입력된다. 문자열의 길이는 $1\,000$을 넘지 않는다. www.acmicpc.net 1 2 3 4 5 6 7 8 def solution(s): return s.count('DKSH') if __name__ == '__main__': s = input() print(solution(s)) cs Python 문자열에는 count 메소드가 있어서 특정 문자열이 몇번 포함됐는지 셀 수 있습니다. 2023. 11. 16.
백준 30328 Java Warriors https://www.acmicpc.net/problem/30328 30328번: Java Warriors Jerry has earned acclaim as a renowned coach in the highly competitive realm of the International Collegiate Programming Contest (ICPC). His coaching prowess is exemplified by his unique approach — meticulously training his students to excel in ICPC comp www.acmicpc.net 1 2 3 4 5 6 7 8 def solution(n): return n * 4000 if __name__ == '__.. 2023. 11. 16.
백준 30664 Loteria Falha https://www.acmicpc.net/problem/30664 30664번: Loteria Falha Para cada caso de teste haverá uma linha na saída. Caso o número identificador do cartão seja um múltiplo de 42, imprima “PREMIADO”. Caso contrário, imprima “TENTE NOVAMENTE”. www.acmicpc.net 1 2 3 4 5 6 7 8 9 10 11 12 13 def solution(n): if n % 42 == 0: return 'PREMIADO' else: return 'TENTE NOVAMENTE' if __name__ == '__main__': while T.. 2023. 11. 16.
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.