All submissions for this problem are available.
Your friend has recently started playing Battlefield, and is very impressed by the dynamics of the game. However, he's still a noob.
One of the things that he's struggling with is the bullet drop over long distances, while shooting with sniper rifles. You decide to help him out by creating an overlay game mod, which tells him exactly how far up to aim in his reticle to account for the bullet drop over various distances.
The drop is not noticeable till a distance of 100 meters, and after that the bullet drops 0.1 centimeters for every 20 meters. Given x, the distance between your friend and the enemy camper, output y, the deviation due to the bullet drop.
The first line of the input contains an integer N, denoting the number of instances of the problem to solve. The next N integers denote x, the distance in meters.
For each of the N instances, output y, the bullet drop in centimeters. y should have an absolute or relative error of less than 10-6.
- 1 ≤ N ≤ 106
- 1 ≤ x ≤ 108
Input: 5 100 120 140 200 103 Output: 0.000000 0.100000 0.200000 0.500000 0.015000
|Time Limit:||2 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions