시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 4340 1660 1475 38.694%

문제

19세기 독일 수학자 헤르만 민코프스키는 비유클리드 기하학 중 택시 기하학을 고안했다.

택시 기하학에서 두 점 T1(x1,y1), T2(x2,y2) 사이의 거리는 다음과 같이 구할 수 있다.

D(T1,T2) = |x1-x2| + |y1-y2|

두 점 사이의 거리를 제외한 나머지 정의는 유클리드 기하학에서의 정의와 같다.

따라서 택시 기하학에서 원의 정의는 유클리드 기하학에서 원의 정의와 같다.

원: 평면 상의 어떤 점에서 거리가 일정한 점들의 집합

반지름 R이 주어졌을 때, 유클리드 기하학에서 원의 넓이와, 택시 기하학에서 원의 넓이를 구하는 프로그램을 작성하시오.

입력

첫째 줄에 반지름 R이 주어진다. R은 10,000보다 작거나 같은 자연수이다.

출력

첫째 줄에는 유클리드 기하학에서 반지름이 R인 원의 넓이를, 둘째 줄에는 택시 기하학에서 반지름이 R인 원의 넓이를 출력한다.

넓이는 소수점 여섯째 자리까지 출력한다.

예제 입력 1

1

예제 출력 1

3.141593
2.000000

힌트

W3sicHJvYmxlbV9pZCI6IjMwNTMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWQwZGRcdWMyZGMgXHVhZTMwXHVkNTU4XHVkNTU5IiwiZGVzY3JpcHRpb24iOiI8cD4xOVx1YzEzOFx1YWUzMCBcdWIzYzVcdWM3N2MgXHVjMjE4XHVkNTU5XHVjNzkwIFx1ZDVlNFx1Yjk3NFx1YjljYyBcdWJiZmNcdWNmNTRcdWQ1MDRcdWMyYTRcdWQwYTRcdWIyOTQgXHViZTQ0XHVjNzIwXHVkMDc0XHViOWFjXHViNGRjIFx1YWUzMFx1ZDU1OFx1ZDU1OSBcdWM5MTEgXHVkMGRkXHVjMmRjIFx1YWUzMFx1ZDU1OFx1ZDU1OVx1Yzc0NCBcdWFjZTBcdWM1NDhcdWQ1ODhcdWIyZTQuPFwvcD5cclxuXHJcbjxwPlx1ZDBkZFx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IHJhZGl1cyBSLCBvbmUgb2Ygd2hpY2ggaXMgaW4gbm9ybWFsIChFdWNsaWRpYW4pIGdlb21ldHJ5LCBhbmQgdGhlIG90aGVyIGluIHRheGljYWIgZ2VvbWV0cnkuIFRoZSBidXJkZW4gb2Ygc29sdmluZyB0aGlzIGRpZmZpY3VsdCBwcm9ibGVtIGhhcyBmYWxsZW4gb250byB5b3UuJm5ic3A7PFwvcD5cclxuIiwiaW5wdXQiOiI8cD5UaGUgZmlyc3QgYW5kIG9ubHkgbGluZSBvZiBpbnB1dCB3aWxsIGNvbnRhaW4gdGhlIHJhZGl1cyBSLCBhbiBpbnRlZ2VyIHNtYWxsZXIgdGhhbiBvciBlcXVhbCB0byAxMDAwMC4mbmJzcDs8XC9wPlxyXG5cclxuPHA+Jm5ic3A7PFwvcD5cclxuIiwib3V0cHV0IjoiPHA+T24gdGhlIGZpcnN0IGxpbmUgeW91IHNob3VsZCBvdXRwdXQgdGhlIGFyZWEgb2YgYSBjaXJjbGUgd2l0aCByYWRpdXMgUiBpbiBub3JtYWwgKEV1Y2xpZGlhbikgZ2VvbWV0cnkuIE9uIHRoZSBzZWNvbmQgbGluZSB5b3Ugc2hvdWxkIG91dHB1dCB0aGUgYXJlYSBvZiBhIGNpcmNsZSB3aXRoIHJhZGl1cyBSIGluIHRheGljYWIgZ2VvbWV0cnkuJm5ic3A7PFwvcD5cclxuXHJcbjxwPk5vdGU6IE91dHB1dHMgd2l0aGluICZwbHVzbW47MC4wMDAxIG9mIHRoZSBvZmZpY2lhbCBzb2x1dGlvbiB3aWxsIGJlIGFjY2VwdGVkLjxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

Contest > Croatian Open Competition in Informatics > COCI 2006/2007 > Contest #1 2번

  • 문제를 번역한 사람: baekjoon
  • 문제의 오타를 찾은 사람: onjo0127