Logo
(追記) (追記ここまで)

16837번 - Manhattan 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB215745846.774%

문제

In Manhattan, there are streets x = i and y = i for each integer i. It is known that both Snuke’s house and Smeke’s house are on streets, and the Euclidean distance between them is exactly d. Compute the maximal possible distance between their houses when they travel along streets.

입력

The input contains one number d.

  • 0 < d ≤ 10
  • d contains exactly three digits after the decimal point.

출력

Print the answer. The answer is considered to be correct if its absolute or relative error is at most 10−9.

제한

예제 입력 1

1.000

예제 출력 1

2.000000000000

예제 입력 2

2.345

예제 출력 2

3.316330803765

힌트

출처

Contest > ICPC Japanese Alumni Group > JAG Summer Camp > JAG Summer Camp 2014 Day 2 A번

Camp > Petrozavodsk Programming Camp > Winter 2015 > Day 2: Makoto Soejima Contest 1, Japanese Grand Prix A번

Contest > Open Cup > 2014/2015 Season > Stage 6: Grand Prix of Japan A번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /