Divisors [II]
Divisors [II]
The blurb for this problem is the same as Divisors [I], save for the statement of the problem.
Consider the sequence of all natural numbers, and then for each number, listing each of the divisors of this number in increasing order:
123456…becomes:
11213124151236…Since this (infinite) sequence has a lot of duplicates, we can notate for each digit whether it is the first, second, third... occurence using a subscript:
1112211331142241155116233261…For the second problem, we'd like to find the exact index of a particular value. For example, 11 has index 1, 12 has index 2, 21 has index 3, and so on.
Input
Input will contain a single value i_j, representing value ij
Output
Output a single integer representing the 1 index of the value in the sequence
Constraints
- 1≤i×j≤1011
Example
5_1
10
Comments0
No comments yet
Be the first to comment.
New comment
Log in to join the discussion.