Not an official ACM page
[Problem B | 1994 Western European Regional problem set | My ACM problem archive | my home page]

1994-1995 ACM International Collegiate Programming Contest
Western European Regional
Practice Session

Problem A

Floppies

In this age of Internet, on-line connections, instantaneous email etc., there are still some of the unhappy few who need to work with floppy disks. John is one of those. Every evening he goes home and wants to continue what he was doing at work on his private UNIX system. Thus, every night he considers the files he needs, and then puts them on one or more floppy disks.

For this, he has developed the following procedure:

This procedure so far always worked, since 1.86 of uuencoded text, after compression, will nicely fit on a 1.44 Mb floppy disk.

Now, given that, through compression, the size of the SHAR file halves and that uuencoding a compressed file adds 50% to its size (each rounded to the nearest integer number of bytes), we would like to know for a given size of the SHAR file, how many floppies John needs.

Input

The first line of input contains an integer N, specifying the number of test cases. Each test case consists of a single line containing one integer S (0 <= S <= 1,000,000,000), being the size of the SHAR file in bytes.

Output

For each test case write the following sentence: 'For B bytes of SHAR file, F floppies are needed.', where B is the size of the SHAR file in bytes, and F is the minimum number of floppies needed for the transfer.

Sample Input

3
1000000
10000000
100000000

Sample Output

For 1000000 bytes of SHAR file, 1 floppies are needed.
For 10000000 bytes of SHAR file, 5 floppies are needed.
For 100000000 bytes of SHAR file, 41 floppies are needed.

This page maintained by Ed Karrels.
Last updated September 20, 1999