Algorithm475 [파이썬] 백준 - 8단계 입출력과 사칙연산 백준 - 8단계 입출력과 사칙연산 달팽이는 올라가고 싶다 (2869) A,B,V = map(int,input().split()) import math if A>V : print(1) else : print(math.ceil((V-A)/(A-B))+1) 벌집 (2292) N = int(input()) temp = (N-2)/6 check_point,i = 0,0 while True: if N==1: print(1) break else: check_point += i i += 1 if check_point > temp: print(i) break 수열찾는문제 분수찾기 (1193) X = int(input()) check_point,i = 1,1 while True: if X == 1 : print('1/1'.. 2023. 4. 5. [파이썬] 프로그래머스 레벨2 프로그래머스 Lv2땅따먹기 (푸는중)def solution(land): sum1,sum2,now_index1,now_index2 = 0,0,0,0 case1,case2 = [3],[2] table =[] for i in range(len(land)): temp =[] for j in range(4): temp_sort = land[i].copy() temp_sort.sort() temp.append(land[i].index(temp_sort[j])) table.append(temp) if i==0: now_index1 = table[i].in.. 2023. 4. 2. [파이썬] 프로그래머스 레벨1 프로그래머스 Lv11회독 목표 : 빨리풀기, 정답맞추기(2회독 목표 : 코드 길이/복잡도 줄이기)가나다순 정렬 ctrl + F로 찾기~가운데 글자 가져오기def solution(s): answer = '' if len(s)%2 == 1 : answer += s[int(len(s)/2)] else : answer += s[int(len(s)/2)-1:int(len(s)/2)+1] return answer가장 가까운 같은 글자def solution(s): a = 'abcdefghijklmnopqrstuvwxyz' b = [-1 for i in range(len(a))] table = dict(zip(a,b)) temp = [] fo.. 2023. 3. 30. 이전 1 ··· 116 117 118 119 다음