목록설명 (73)
안경잡이 구루루
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/d3Yg8K/btsrRZtixFo/ioTQLGFeYCOMnK8WDTkqZk/img.png)
https://www.acmicpc.net/problem/5597 5597번: 과제 안 내신 분..? X대학 M교수님은 프로그래밍 수업을 맡고 있다. 교실엔 학생이 30명이 있는데, 학생 명부엔 각 학생별로 1번부터 30번까지 출석번호가 붙어 있다. 교수님이 내준 특별과제를 28명이 제출했는데, www.acmicpc.net 나: all = list(range(1, 30+1)) for i in range(28): submit = int(input()) all.remove(submit) for j in all: print(j) 완성된 코드는 위와 같다. (1) all = list(range(1, 30+1)) 총 학생수는 30명이고 각 학생별 1번부터 30까지 연속으로 출석번호가 붙어 있기 떄문에 list, ..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/QDJXo/btqFnjAedcW/4nkagm630VHv1ugwY63IAk/img.png)
https://www.acmicpc.net/problem/1152 나: sentence = input() word = sentence.split() print(len(word)) 완성된 코드는 위와 같다. sentence라는 변수에 입력값을 받는다. 이때 단어는 빈칸을 기준으로 나눠 지는 것이기 때문에 split()을 이용해서 나눠서 word라는 새로운 변수에 리스트 형태로 각 단어들이 저장된다. 그리고 이 리스트의 길이를 구하고 출력하면 쉽게 문제를 풀 수 있다. 결록은 파이썬 짱짱맨
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/64UU6/btqFoBzr55I/4BpOt7nTdAC06IFj0pwMM1/img.png)
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 대소문자로 이루어진 ..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/ZuECo/btqFmuWg4kK/KMLIvKqciACDksdegkDRP0/img.png)
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]*..