Submit | All submissions | Best solutions | Back to list |
HS08NAIL - Come and buy! |
Old Leo decided to open another shop in the city, and he intends to inform all the citizens about this. Hence, his little helper Johnny has ended up with another task to solve:
"Along High Street there are n houses (numbered from 1 to n), equally spaced with 100 meters in between each pair of neighbouring houses. Your task is to nail an advertisement of my new shop in front of each house. You can start from any house, but you must choose the sequence of visited houses in such a way that the length of your route is maximized. But remember, that the route between two successive houses in your sequence must be as shortest as possible."
Input
Every data set consists of one positive integers n, where 1 <= n <= 1000 represents the number of houses.
Output
Write to output the maximum length (in meters) of the Johnny route from the first to the last house, starting from one of them choosen by Johnny.
Example 1
Input: 2 Output: 100
Example 2
Input: 4 Output: 700
Scoring
For every test data you can get 2 points, summing to a total of 10 points.
Added by: | mima |
Date: | 2009-01-11 |
Time limit: | 0.200s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | ADA95 ASM32 BASH BF C CSHARP CPP C99 CLPS LISP sbcl LISP clisp D FORTRAN HASK ICON ICK JAVA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON RUBY SCM guile SCM qobi ST TEXT WHITESPACE |
Resource: | High School Programming League 2008/2009 |