You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bradendubois edited this page Jun 9, 2021 · 6 revisions
Repeating Decimal
ID: repeatingdecimal
Difficulty: 3.4
CPU Time: 2 seconds
Memory: 1024 MB
Solution
For this, one can just implement basic long division. Since a < b, output "0." to start, and then, looping c times: if a < b, a *= 10; output a / b, and mod b from a.