QOJ.ac

QOJ

時間限制: 1.0 s 記憶體限制: 32 MB 總分: 20

#17546. Herman

统计

19 世纪的德国数学家赫尔曼·闵可夫斯基(Hermann Minkowski)研究了一种非欧几里得几何,称为出租车几何。在出租车几何中,两点 $T_1(x_1, y_1)$ 和 $T_2(x_2, y_2)$ 之间的距离定义为:

$$D(T_1, T_2) = |x_1 - x_2| + |y_1 - y_2|$$

其他所有定义都与欧几里得几何相同,包括圆的定义:

圆是平面上到定点(圆心)的距离为定值(半径)的所有点的集合。

我们对两个半径为 $R$ 的圆的面积差异感兴趣,其中一个处于普通的(欧几里得)几何中,另一个处于出租车几何中。解决这个难题的重任落在了你的肩上。

输入格式

输入的第一行也是唯一的一行包含半径 $R$,这是一个小于或等于 $10000$ 的整数。

输出格式

第一行输出在普通(欧几里得)几何中半径为 $R$ 的圆的面积。

第二行输出在出租车几何中半径为 $R$ 的圆的面积。

说明

注意:与标准答案误差在 $\pm 0.0001$ 以内的输出将被接受。

样例

输入样例 1

1

输出样例 1

3.141593
2.000000

输入样例 2

21

输出样例 2

1385.442360
882.000000

输入样例 3

42

输出样例 3

5541.769441
3528.000000

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.