Fraction to Recurring Decimal
Medium
Hashing (Advanced)
Given a numerator and a denominator, print the fraction as a decimal string. If the fractional part repeats, enclose the repeating digits in parentheses.
Constraints
-2^31 <= numerator, denominator <= 2^31 - 1 denominator != 0
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.