출처

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AWHz7xD6A20DFAVB&categoryId=AWHz7xD6A20DFAVB&categoryType=CODE&problemTitle=&orderBy=PASS_RATE&selectCodeLang=PYTHON&select-1=3&pageSize=10&pageIndex=8

과정

  1. 문제의 입력에 맞게 a의 길이가 n이 될때까지 공백없이 문자열로 입력 받는다.
  2. 없는 수를 찾을 cnt를 0으로 초기화 해준다.
  3. a에서 str(cnt)가 없다면 break해주고 있다면 cnt를 계속 1씩 증가시켜준다.
  4. 테스트 케이스 번호와 cnt를 출력해준다.

정답 코드

태그: ,

카테고리:

업데이트: