14. Python(브루트 포스 실습)
[toc] 부루트 포스 실습(영화감독 슘) 문제 https://www.acmicpc.net/problem/1436 제출 코드 n = int(input()) cnt = 1 num = 666 while (cnt <= n): if '666' in str(num): cnt += 1 num += 1 pr...
[toc] 부루트 포스 실습(영화감독 슘) 문제 https://www.acmicpc.net/problem/1436 제출 코드 n = int(input()) cnt = 1 num = 666 while (cnt <= n): if '666' in str(num): cnt += 1 num += 1 pr...
[toc] 체스판 다시 칠하기 문제 https://www.acmicpc.net/problem/1018 제출 코드 m, n = map(int, input().split()) chess_list = [input() for _ in range(m)] pattern_b = [ "BWBWBWBW", "WBWBWBWB", ...
[toc] 분해합 문제 https://www.acmicpc.net/problem/2231 제출 코드1 n = int(input()) for i in range(1, n+1): a = sum(map(int, str(i))) a_sum = i + a if a_sum == n: print(i) ...
[toc] 벌집 문제 https://www.acmicpc.net/problem/11653 제출 n = int(input()) s_num = 2 while s_num <= n: if n % s_num == 0: print(s_num) n = n / s_num else: ...
[toc] 벌집 문제 https://www.acmicpc.net/problem/2581 제출 m = int(input()) n = int(input()) sosu_list = [] for i in range(m, n+1): cnt = 0 if i < 2: continue for j in r...
[toc] 벌집 문제 https://www.acmicpc.net/problem/9506 제출 while True: a = int(input()) if a == -1: break a_list = [i for i in range(1, a) if a % i == 0] if sum(a_list)...
[toc] 벌집 문제 https://www.acmicpc.net/problem/2292 제출 num = int(input()) room = 1 rst = 1 while room < num: room += 6 * rst rst += 1 print(rst) 13 3 58 5 인사이트 간단한 알...
[toc] 중앙 이동 알고리즘 문제 https://www.acmicpc.net/problem/2903 제출 N = int(input()) a = 2 b = 1 for i in range(N): a += b b *= 2 print(a**2) 1 9 2 25 3 81 4 289 5 1089 인사이트 ...
[toc] 진법 변환 문제 https://www.acmicpc.net/problem/2745 제출 from string import ascii_uppercase a, b = map(str, input().split()) A_list = list(a) A_list.reverse() alp_dic = {} for i in ascii_upp...
[toc] 평점 계산기 문제 https://www.acmicpc.net/problem/2738 오답 import numpy as np n, m = map(int, input().split()) if n > 100 and m > 100: raise ValueError("행과 열의 크기는 100을 넘을 수 없습니다.") ...