QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 256 MB Total points: 100

#3219. Manhattan

Statistics

In Manhattan gibt es für jede ganze Zahl $i$ Straßen $x = i$ und $y = i$. Es ist bekannt, dass sowohl das Haus von Snuke als auch das Haus von Smeke auf Straßen liegen und ihr euklidischer Abstand genau $d$ beträgt. Berechne den größtmöglichen Abstand zwischen ihren Häusern, wenn sie sich entlang der Straßen bewegen.

Eingabe

Die Eingabe enthält eine Zahl $d$.

  • $0 < d \le 10$

  • $d$ hat genau drei Ziffern nach dem Dezimalpunkt.

Ausgabe

Gib die Antwort aus. Die Antwort wird als korrekt angesehen, wenn ihr absoluter oder relativer Fehler höchstens $10^{-9}$ beträgt.

Beispiele

Eingabe 1

1.000

Ausgabe 1

2.000000000000

Eingabe 2

2.345

Ausgabe 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.