#P10314. [SHUPC 2024] 函数

    ID: 11728 远端评测题 1000ms 512MiB 尝试: 0 已通过: 0 显示难度普及− 上传者: 标签>2024Special Judge高校校赛

[SHUPC 2024] 函数

Problem Description

Little A is learning about functions. One day, she found a wonderful function:

f(x)=x0.5+arctan(cot(πx))πf(x)=x-0.5+\frac{\arctan(\cot(\pi x))}{\pi}

She likes this function very much. Now, she will ask you TT queries. Each query contains a floating-point number xx, and you only need to output the value of f(x)f(x).

An output is considered correct if the absolute error or relative error compared with the standard answer does not exceed 10610^{-6}.

Input Format

The first line contains an integer T (T104)T\ (T\le 10^4), indicating the number of test cases.

In the next TT lines, each line contains a floating-point number xx. It is guaranteed that 0x1090 \le x \le 10^9 and xNx \notin \N (i.e., xx is not a natural number).

Output Format

Output TT lines, each containing one number, which is the answer.

An output is considered correct if the absolute error or relative error compared with the standard answer does not exceed 10610^{-6}.

3
1.10
1.72
2.34
1.000000
1.000000
2.000000

Hint

Translated by ChatGPT 5