Given a potentially recurring binary string, output the number it represents, as a fraction in lowest terms.
The notation used in this challenge for recurring digits is non-standard. An r is used ...

Take an input string representing a number and convert it to decimal (base 10). However, the base of the input is not specified. Assume the input is in the smallest base for which its digits are va...

5 answers
·
posted 4mo ago
by trichoplax
· last activity
4mo ago
by Shaggy

Rational numbers in decimal representation can have an infinite periodic part. One common way to write this down is to repeat the periodic digits and then add three dots. Numbers without those thre...