일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- VS
- 문제풀이
- Implemention
- 백준
- 정리
- C
- 그리디
- 초보
- 코드엔진
- 파이썬
- c언어
- greedy
- CSS
- 알고리즘
- C 언어
- 문자열
- Beakjoon
- Baekjoon
- HTML
- C Programming
- 10807
- 입문
- 친절한 설명
- 설명
- Python
- 심화1
- implement
- 구현
- 꾸준히
- 10926
- Today
- Total
목록Python (91)
안경잡이 구루루

https://www.acmicpc.net/problem/1157 나: word = input() ws = word.lower() a = sorted(set(ws)) alpha= [] high = 0 ouput = 0 for i in a: if ws.count(i) >= high: high = ws.count(i) alpha.append(high) output = i else: pass if alpha.count(max(alpha)) >= 2: print('?') else: print(output.upper()) 완성된 코드는 위와 같다. word = input() ws = word.lower() a = sorted(set(ws)) alpha= [] high = 0 ouput = 0 대소문자로 이루어진 ..

https://www.acmicpc.net/problem/2675 나: T = int(input()) for i in range(T): R,S = input().split() s='' for i in range(len(S)): s += S[i]*int(R) print(s) 완성된 코드는 위와 같다. T = int(input()) for i in range(T): R,S = input().split() s='' 테스트 케이스를 결정하는 변수 T에 입력값을 받는다. 그 입력값 만큼 반복문 For을 통해서 반복횟수 R과, 문자열 S를 받는다. 이때 반복으로 새롭게 만들어진 문자열이 들어갈 변수 s 를 문자열을 더할 수 있도록 ''로 초기화 시켰다. for i in range(len(S)): s += S[i]*..

https://www.acmicpc.net/problem/10809 나: S = input() abc ='abcdefghijklmnopqrstuvwxyz' for i in abc: if i in S: print(S.index(i), end= ' ') else: print( -1, end =' ') 완성된 코드는 위와 같다. S = input() abc ='abcdefghijklmnopqrstuvwxyz' 우선 단어를 입력받을 변수 S를 선언. 그리고 이따 반복문으로 알파벳의 존재 유무를 확인하기 위해 사용할 알파벳들이 존재하는 abc 선언 for i in abc: if i in S: print(S.index(i), end= ' ') else: print( -1, end =' ') 우리가 입력한 S에 알파..

나(방법1): N= int(input()) num = input() add=0 if N == len(num): for i in range(len(num)): add += int(num[i]) print(add) 완성된 코드는 위와 같다. N= int(input()) num = input() add=0 숫자의 개수를 나타내는 변수 N을 정수형으로 입력받는다. num 공백없이 나타낼 수로 문자형으로 받는다. add는 num의 수가 더해진 최종값이 들어갈 변수로 0으로 초기화 한다. if N == len(num): for i in range(len(num)): add += int(num[i]) print(add) 숫자의 개수를 나타낸 N과 입력받은 num의 개수가 참일 때 for 반복문을 이용해 값을 더해나가..