728x90 반응형 Python2 [python 백준] 1236번 성 지키기 교양시험대비! 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 row,col=map(int,input().split()) lst=[] for i in range(row): lst.append(list(map(str,input().strip()))) row_cnt=0 col_cnt=0 #행 for i in range(row): if "X" not in lst[i]: row_cnt+=1 #열 for i in range(col): std=row for j in range(row): if "X" in lst[j][i]: std-=1 if(std==row): col_cnt+=1 # row와 col중 더 작은거 print(max(.. 2022. 4. 11. [python 백준] 실버3/백준 13414번 수강신청 https://www.acmicpc.net/problem/13414 13414번: 수강신청 입력 데이터는 표준 입력을 사용한다. 입력은 1개의 테스트 데이터로 구성된다. 입력의 첫 번째 줄에는 과목의 수강 가능 인원 K(1 ≤ K ≤ 100,000)와 학생들이 버튼을 클릭한 순서를 기록한 대기목 www.acmicpc.net 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 import sys input=sys.stdin.readline k,l=map(int,input().rstrip().split()) d=dict() d2=dict() lst=[] for i in range(l): x = input().rstrip() # 학번은 문자열로 d[l-i]=x #학.. 2021. 6. 20. 이전 1 다음 728x90 반응형