0045. The observation post
Имя входного файла: | post.in |
Имя выходного файла: | post.out |
Ограничение по времени: | 1 s |
Ограничение по памяти: | 64 megabytes |
Once people have built an observation post on the surface of a spherical planet. Your task is to calculate total area visible from the top of this post.
Input file
The input file consits of two integer numbers R and h. R is a radius of the planet measured in meters. h is the height of the post. Both R and h are in range 1≤ R, h≤ 108.
Output file
Write to the output file total area of the part of planet surface visible from the top measured in square meters. Round the answer to the nearest integer.
Examples:
post.in | post.out |
---|---|
1 1 | 3 |
Источник: Petrozavodsk training camp, Summer 2002. Conclusive contest
Автор: Andrew Lopatin, Nick Durov
Обсудить Отправить решение
Версия для печати