python-for-coding-test icon indicating copy to clipboard operation
python-for-coding-test copied to clipboard

P.311 그리드, 모험가 길드 중에 질문입니다.

Open seodong90 opened this issue 5 years ago • 0 comments

모험가 길드

모험가 N 명, 공포도 측정, 최대 몇개의 그룹

n=map(int,input().split()) data=list(map(int,input().split())) data.sort() print(data)

group=0 # 결과 출력 count=0 # 공포도에 따른 사람의 수 for i in range(len(data)): count+=1 **if data[i]==count: # 질문 부분) 이 부분이 책에서는 count>=data[i]로 하셨는데 count가 초과할 경우가 있나요?! 같다고만 해도 될것같은데 만약 같다고 하면 반례가 있을까요?! ** count=0

print(group)

seodong90 avatar Jan 13 '21 06:01 seodong90