알고리즘 문제 풀기 썸네일형 리스트형 BOJ 1152 - 단어의 개수 https://www.acmicpc.net/problem/1152 BOJ 1152 - 단어의 개수 작성언어: Python3words = list(input().split())print(len(words))pc 환경에서 코드를 보는 것을 권장합니다. BOJ 1157 - 단어 공부 https://www.acmicpc.net/problem/1157 BOJ 1157 - 단어 공부 작성언어: Python3xword = input().upper()counts = [0] * 27for i in range(0, 26): counts[i] = word.count(chr(i+65))mostCount = max(counts)if counts.count(mostCount) > 1: print('?')else: print(chr(counts.index(mostCount)+65))pc 환경에서 코드를 보는 것을 권장합니다. BOJ 2675 - 문자열 반복 https://www.acmicpc.net/problem/2675 BOJ 2675 - 문자열 반복 작성언어: Python3t = int(input())for i in range(t): r, string = input().split() r = int(r) for ch in string: for j in range(r): print(ch, end='') print()pc 환경에서 코드를 보는 것을 권장합니다. BOJ 10809 - 알파벳 찾기 https://www.acmicpc.net/problem/10809 BOJ 10809 - 알파벳 찾기 작성언어: Python3word = input()for asc in range(ord('a'), ord('z')+1): if chr(asc) not in word: print(-1, end=' ') continue else: for i in range(0, len(word)): if word[i] == chr(asc): print(i, end=' ') breakpc 환경에서 코드를 보는 것을 추천합니다. BOJ 11654 - 아스키 코드 https://www.acmicpc.net/problem/11654 BOJ 11654 - 아스키 코드 작성언어: Python3inp = input()print(ord(inp))pc 환경에서 코드를 보는 것을 권장합니다. BOJ 10872 - 팩토리얼 https://www.acmicpc.net/problem/10872 BOJ 10872 - 팩토리얼 작성언어: Python3num = int(input())result = 1for i in range(1, num+1): result *= iprint(result)pc 환경에서 코드를 보는 것을 권장합니다. BOJ 15596 - 정수 N개의 합 https://www.acmicpc.net/problem/15596 BOJ 15596 - 정수 N개의 합 작성언어: Python3def solve(numList): result = 0 for num in numList: result += num return resultpc 환경에서 코드를 보는 것을 권장합니다. BOJ 8958 - OX퀴즈 https://www.acmicpc.net/problem/8958 BOJ 8958 - OX퀴즈 작성언어: Python3t = int(input())result = []for i in range(t): ox = input() result.append(ox)for ox_list in result: score = 0 continousScore = 0 for ox in ox_list: if ox == 'O': if continousScore > 0: continousScore += 1 else: continousScore = 1 score += continousScore else: continousScore = 0 print(score)pc 환경에서 코드를 보는 것을 권장합니다. 이전 1 2 3 4 5 6 7 ··· 33 다음