12 lines
175 B
Python
12 lines
175 B
Python
#4.6.1
|
|
from random import*
|
|
from math import*
|
|
N1 = 0
|
|
N = eval((input()))
|
|
for i in range(N):
|
|
x = random()
|
|
y = random()
|
|
if hypot(x,y)<=1:
|
|
N1+=1
|
|
print(N1/N*4)
|