Magnesium Supplementation

시간 제한1초메모리 제한1024 MB

요약
n을 나누고 n/d가 p 이하가 되는, k 이하의 모든 알약 용량 d를 세어 오름차순으로 출력한다.
난이도

보통10점 중 5점

유형
정수론, 수학, 정렬
정답자
아직 제출이 없습니다

문제

At a recent doctor's appointment, Brandon has been marked as being deficient in magnesium. His doctor has advised him to take exactly some number of picograms of magnesium a day. His doctor can prescribe pills that have any integer number of picograms of magnesium from one up to a maximum. Brandon doesn't like taking pills though, so he refuses any prescription that requires him to take too many pills in a day.

Your task is to find all prescriptions that Brandon could be given. Note that all pills prescribed to Brandon must have the same dosage.

입력

The single line of input contains three integers nn, kk and pp (1≤n,k,p≤10111 \le n,k,p \le 10^{11}), where nn is the number of picograms per day that Brandon must take, kk is the maximum amount in picograms of magnesium in any of the pills, and pp is the maximum number of pills per day that Brandon is willing to take.

출력

On the first line, output a single integer, which is the number of prescriptions that Brandon could be given.

On each subsequent line, output a single integer, which is the number of picograms per pill in the prescription. Output the prescriptions in increasing order.

예제2

  1. 예제 1

    입력
    6 6 4
    
    예상 출력
    3
    2
    3
    6
    
  2. 예제 2

    입력
    6 2 3
    
    예상 출력
    1
    2