Type: Default 1000ms 256MiB

分段函数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

计算如下函数值。保证x是整数。 1000x1000-1000 \leq x \leq 1000

$$ f(x)=\left\{ \begin{aligned} & 0 & \ x< 0 \\ & 2 \times x & \ 0 \leq x <10 \\ & 2x+1 & \ 10 \leq x < 50 \\ & x \div 2 +50 & \ 50 \leq x \end{aligned} \right. $$

Input Format

一个整数x。

Output Format

一个保留4位小数的实数。

Sample

input

53

output

76.5000

Hint

保证103x103 -10^3\leq x \leq 10^3

时间限制:1s1 \text {s}

空间限制:256MB256 \text {MB}

20200906-贪心基础练习

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
11
Start at
2020-9-6 13:37
End at
2020-9-26 13:37
Duration
480 hour(s)
Host
Partic.
17