The Amazing Human Cannonball
This commit is contained in:
12
humancannonball2.py
Normal file
12
humancannonball2.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from math import cos, sin, radians
|
||||||
|
|
||||||
|
n = int(input())
|
||||||
|
|
||||||
|
for _ in range(n):
|
||||||
|
v0, angle, x1, h1, h2 = map(float, input().split())
|
||||||
|
t = x1 / v0 / cos(radians(angle))
|
||||||
|
yt = v0 * t * sin(radians(angle)) - 0.5 * 9.81 * t**2
|
||||||
|
if h1 + 1 < yt < h2 - 1:
|
||||||
|
print("Safe")
|
||||||
|
else:
|
||||||
|
print("Not Safe")
|
||||||
Reference in New Issue
Block a user