시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 24 | 7 | 6 | 66.667% |
There is a sequence of positive integers {ai}. For each i (i>1) ai is the least possible integer with the following features:
For the given values of the first sequence member a1 and the index n, you must find and output the value of the an.
The values of integers a1 (0 < a1 < 20) and n (0 < n < 10000) are input from the keyboard.
You must write one integer on the screen - the value of the an. For the testing, only data where the corresponding an value does not increase 109 are to be used.
4 5
79