QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 256 MB 満点: 100

#3219. 曼哈顿

統計

在曼哈顿,对于每个整数 $i$,都有街道 $x = i$ 和 $y = i$。已知 Snuke 的家和 Smeke 的家都在这些街道上,且它们之间的欧几里得距离恰好为 $d$。请计算当他们沿街道行走时,两家之间可能的最大距离。

输入格式

输入包含一个数字 $d$。

  • $0 < d \le 10$
  • $d$ 小数点后恰好有三位数字。

输出格式

输出答案。如果答案的绝对误差或相对误差不超过 $10^{-9}$,则视为正确。

样例

输入格式 1

1.000

输出格式 1

2.000000000000

输入格式 2

2.345

输出格式 2

3.316330803765

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.