INOI-2003, Sample questions
Problem 3: Recurring decimals
Write a program that reads an integer n as input and prints out the decimal representation of 1/n. If 1/n is a recurring decimal, print out two copies of the recurring portion. You may assume that n is between 1 and 10000.
Here are some sample inputs and outputs for this problem: