Programming [Python] (411) 썸네일형 리스트형 #240 백준 파이썬 [17389] 보너스 점수 https://www.acmicpc.net/problem/17389 Python Code N = int(input()) S = str(input()) answer = 0 bonus = 0 for i in range(len(S)): if S[i] == 'O': answer += i + 1 + bonus bonus += 1 else: bonus = 0 print(answer) #239 백준 파이썬 [9325] 얼마? https://www.acmicpc.net/problem/9325 Python Code T = int(input()) for _ in range(T): s = int(input()) n = int(input()) price = s for _ in range(n): q, p = map(int, input().split()) price += q * p print(price) #238 백준 파이썬 [16395] 파스칼의 삼각형 https://www.acmicpc.net/problem/16395 Python Code pascal = [[1 for _ in range(i)] for i in range(1, 31)] for i in range(2, 30): for j in range(1, i): pascal[i][j] = pascal[i-1][j-1] + pascal[i-1][j] n, k = map(int, input().split()) print(pascal[n-1][k-1]) #237 백준 파이썬 [10991] 별 찍기 - 16 https://www.acmicpc.net/problem/10991 Python Code N = int(input()) for i in range(1, N+1): print(' '* (N-i), end = '') for j in range(i): print('*', end = ' ') print() #236 백준 파이썬 [10797] 10부제 https://www.acmicpc.net/problem/10797 Python Code N = int(input()) car_list = list(map(int, input().split())) print(car_list.count(N)) #235 백준 파이썬 [17826] 나의 학점은? https://www.acmicpc.net/problem/17826 Python Code GPA = [] GPA += ['A+'] * 5 GPA += ['A0'] * 10 GPA += ['B+'] * 15 GPA += ['B0'] * 5 GPA += ['C+'] * 10 GPA += ['C0'] * 3 GPA += ['F'] * 2 score_list = list(map(int, input().split())) hong = int(input()) print(GPA[score_list.index(hong)]) #234 백준 파이썬 [5532] 방학 숙제 https://www.acmicpc.net/problem/5532 Python Code import math L = int(input()) A = int(input()) B = int(input()) C = int(input()) D = int(input()) print(L - max(math.ceil(A/C), math.ceil(B/D))) #233 백준 파이썬 [11656] 접미사 배열 https://www.acmicpc.net/problem/11656 Python Code S = str(input()) S_list = [] for _ in S: S_list.append(S) S = S[1:] for i in sorted(S_list): print(i) 이전 1 ··· 19 20 21 22 23 24 25 ··· 52 다음