Back
Close
  • 224

Statement

 Goal

Given an input integer N, you must output 1/N in decimal form, with brackets () around any part of the fraction that repeats indefinitely.

Example
4 → 0.25
7 → 0.(142857)
Input
A single line containing an integer N
Output
A single line containing the recurring simplified decimal of 1/N
Constraints
1 < N < 2^31
Example
Input
20
Output
0.05

A higher resolution is required to access the IDE