2: The First Figure
n!=10^x where x=lg(1)+lg(2)+..+lg(n).
As 10^[x]<10^x<10^([x]+1) => 1<10^(x-[x])<10.
The first figure of n! is the biggest k number having the following
In the program, the division and multiplication by ln(10) are due to the
need of working with ln and e (routines of Pascal).
Each program has been tested for (a number of) 10 values of n.
3: The Parallel Machine
The problem was solved by most of the competitors.
The interpretation of the results was the delicate and problem-causing
area. In the initial text it was written that the results are displayed in the
OUTPUT.TXT file (not in the JOBS.TXT or
IN.TXT files), as real, 3-decimal numbers. So 3.600
can be considered a correct answer for a specific test, but 3.6000000
or 3.6000000e00 are not considered valid results. Anyway,there has
been made a checking program for this problem, a program that allowed us to see
the execution time and also one that read your OUTPUT.TXT file
and the out file that resulted from the running of our source
and compared the results.The score was immediately written in a file. As a
general remark, where it was possible, we made interventions and we commented
what you should have commented so that the program be run. It may be an excuse
for the delay in sending the results from the first stage of the contest. We
kindly ask you to consider and follow the regulations of our contest. For the
codified files please send the source, not the .EXE, so that we can help you,
in case you need some help.
We thank you for your participation and wish you good luck further on.
Here are some examples of beautiful sources:
Solution no. 1 (C)
Solution no. 2 (Pascal)