Not an official ACM page
[Problem 2 | 1995 East-Central problem set | My ACM problem archive | my home page]

1995 East-Central Regionals
ACM International Collegiate programming Contest

sponsored by Microsoft

Practice Problem 1 - Long Division

Report the results of the long divisions.

For each integer given, create one line of output that contains the integer quotient that results when the input integer is divided by thirteen (13). Give only the quotient of the integer division and ignore any remainder that might occur.

Do not have any non-significant leading zeros on the output integer. If the integer quotient is zero, give only a single zero digit on that line of output.

Continue processing the input, determining and reporting quotients, until the end-of-file is encountered.

Input

The input is a series of lines, and on each line is an unsigned integer. Each input integer will be at least one digit long, and no longer than 50 digits. Each integer begins with its first digit as the first character on that line.

There will be no non-significant leading zeros on any of the input data.

The input is terminated by an end-of-file.

Output

An output line is to be emitted for each input line. Each output line will have the quotient reported as a contiguous series of digits. The first significant digit of each quotient should be the first character on each line of output.

Example

Input Output
0
12
13
14
25
26
262626
131313131313131313131313131313
0
0
1
1
1
2
20202
10101010101010101010101010101

This page maintained by Ed Karrels.
Last updated November 6, 1997