III Olympiad in Informatics 1995/1996
|
Task: PRE
|
Author: Piotr Chrz±stowki-Wachtel
|
I stage contest |
In laboratories of a certain company a new material called politoksyparen is tested. During the researches an interesting property has been discovered. A simple rod made of this material after being heated lengthens and bends so that it changes into an circular arc based on a chord, which is the shape of the rod at the beginning (this property concerns only rods of short diameters). Let’s assume that n rods with very short diameters and lengths li (1 <= li <= 100000) were used to verify this property, and while being heated they lengthened respectively by di (1 <= di <= 100), where di <= li / 2. As a unit we take one millimeter.
Write a program that:
the correct answer is the output file PRE.OUT:
87
237
Your program should look for the file PRE.IN in the current directory and produce the output file PRE.OUT in the current directory too. The file containing the source code of your program should have a name PRE.???, whereas you should put three-letter abbreviation of the used programming language name instead of ???. The same program in executable form should be written in the file PRE.EXE