ONLINE EDITOR (B)
Roman Iteration
- Problem Description
We know about number systems: The Roman numerals and the alternative place value system with a given base.
For the purposes of this problem, we limit ourselves to
1) Roman numerals with values up to 3999 (MMMCMXCIX)
2) "Place value system numbers having bases from 2 (with possible symbols 0, 1) through 36 (with possible symbols 0, 1, ..., 9, A,... Z)
Consider the following procedure:
1) Accept a natural number N (in base 10).
2) If N lies in the closed interval (1,3999), i.e. between 1 and 3999 (both inclusive), convert N to Rits Roman numeral representation; else output N as the result and stop.
3) Identify the base in which the value of R, now considered to be in place value system", is least and calculate its value in base 10, replacing N with this value.
4) Repeat from step 2.
- Constraints
1 <= N <= 3999.
- Input Format
A single Integer N
- Output
Converted N.
Tast Caca
MacBook Pro
Answers
Answered by
0
I will be send it to over tomorrow and send then to send to it over
Similar questions