출처

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

과정

  1. max까지의 소수를 판단해 num에 넣어준다.
  2. 특별한 소수를 셀 cnt를 0으로 초기화 해준다.
  3. a,b까지 소수이고 d가 i에 들어있으면 cnt에 1을 더해준다.
  4. 테스트 케이스 번호와 cnt를 출력해준다.

정답 코드

태그: ,

카테고리:

업데이트: