본문 바로가기

분류 전체보기322

[백준 알고리즘] 1712번 Python 문제 정보 제출 코드 fix_pay, variable_pay, product_pay = map(int, input().split()) if(product_pay-variable_pay 2021. 10. 4.
[백준 알고리즘] 1978번 Python 문제 정보 제출 코드 count = int(input()) total = count n = list(map(int, input().split())) if(1 in n): n.remove(1) total -= 1 for j in n: for k in range(2,j): if(j%k==0): total -= 1 break print(total) 2021. 10. 4.
[백준 알고리즘] 1316번 Python 문제 정보 제출 코드 count = int(input()) total = 0 for i in range(count): word = input() check = 0 for i in range(len(word)-1): if(word[i]==word[i+1]): continue elif(word[i] in word[i+1:]): check = 1 break if(check==0): total += 1 print(total) 2021. 10. 4.
[백준 알고리즘] 2941번 Python 문제 정보 제출 코드 word = input() croatia_list = ["c=","c-","dz=","d-","lj","nj","s=","z="] total = 0 for croatia in croatia_list: total += word.count(croatia) word = word.replace(croatia, " ") total+=len(word.replace(" ","")) print(total) 2021. 10. 4.
[백준 알고리즘] 5622번 Python 문제 정보 제출 코드 word = input() total = 0 time_list = {"A":3,"B":3,"C":3,"D":4,"E":4,"F":4,"G":5,"H":5,"I":5,"J":6,"K":6,"L":6,"M":7,"N":7,"O":7,"P":8,"Q":8,"R":8,"S":8,"T":9,"U":9,"V":9,"W":10,"X":10,"Y":10,"Z":10} for s in word: total += time_list[s] print(total) 2021. 10. 4.
[백준 알고리즘] 2908번 Python 문제 정보 제출 코드 a, b = input().split() a = int(a[::-1]) b = int(b[::-1]) if(a 2021. 10. 4.
[백준 알고리즘] 1152번 Python 문제 정보 제출 코드 string = input().split() print(len(string)) 2021. 10. 4.
[백준 알고리즘] 1157번 Python 문제 정보 제출 코드 string = input().upper() tmp = list(set(string)) n = [] for s in tmp: n.append(string.count(s)) # 얕은 복사 (tmp_n = n은 깊은 복사) tmp_n = n[:] try: tmp_n.remove(max(n)) tmp_n.remove(max(n)) print("?") except: print(tmp[n.index(max(n))]) 2021. 10. 4.
[백준 알고리즘] 2675번 Python 문제 정보 제출 코드 count = int(input()) for i in range(count): tmp = input().split() n = int(tmp[0]) string = tmp[1] for s in string: print(n*s, end='') print() 2021. 10. 4.