<jupyter_start><jupyter_text>HermanThis problem asks for the area of a circlewhen the radius is the Euclidean distance (length of a straight line) andwhen it is the Manhattan distance (vertical and horizontal displacement).<jupyter_code>from test import test<jupyter_output><empty_output><jupyter_text>Official solutionIn Euclidean geometry, the area of a circle with radius $r$ is $\pi r^2$.To find out the area for Manhattan geometry,let's draw all the points that are at the same distance from the centre,by going first up or down, and then right or left,for a total of $r = 2$ units. We get a square:![square of 'radius' 2](square.png)Points marked '2+0' are two vertical units and zero horizontal unitsfrom the centre _C_. Points marked '1+1' are also 2 units away from _C_,but this time one vertical unit and one horizontal unit.Using Pythagoras' theorem,the side of the square is $\sqrt{r^2 + r ^2} = \sqrt{2r^2}$,and the area is the square of that: $2r^2$.<jupyter_code>%%writefile herman.py

from math import pi

radius = int(input())
print(f'{pi * radius * radius:.6f}')
print(f'{2 * radius * radius:.6f}')
test('herman')<jupyter_output>Processed herman/herman.in.1 in 0.0447976 seconds
Processed herman/herman.in.10 in 0.0449957 seconds
Processed herman/herman.in.2 in 0.0389937 seconds
Processed herman/herman.in.3 in 0.0380185 seconds
Processed herman/herman.in.4 in 0.0390748 seconds
Processed herman/herman.in.5 in 0.040617 seconds
Processed herman/herman.in.6 in 0.0410434 seconds
Processed herman/herman.in.7 in 0.0380011 seconds
Processed herman/herman.in.8 in 0.0392768 seconds
Processed herman/herman.in.9 in 0.0386682 seconds
{'fraction_non_alphanumeric': 0.0905224787363305, 'fraction_numerical': 0.06500607533414338, 'mean_word_length': 5.168539325842697, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '394872', 'license': 'MIT', 'n_tokens_mistral': 589, 'n_tokens_neox': 533, 'n_words': 204, 'path': 'coci/2006-1/herman.ipynb', 'repo_name': 'mwermelinger/algorithmic-problems', 'size': '1646'}