Compare commits
6 Commits
95aa076e8f
...
910504b0d7
| Author | SHA1 | Date | |
|---|---|---|---|
| 910504b0d7 | |||
| 95979cdcf0 | |||
| 11de2df636 | |||
| 1c2396075e | |||
| 1182218885 | |||
| 2d740cf8d3 |
19
easiest.py
Normal file
19
easiest.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
def sumOfDigits(n: int) -> int:
|
||||||
|
sod = 0
|
||||||
|
while True:
|
||||||
|
sod += n % 10
|
||||||
|
n = n // 10
|
||||||
|
if n == 0:
|
||||||
|
return sod
|
||||||
|
|
||||||
|
|
||||||
|
n = int(input())
|
||||||
|
while n:
|
||||||
|
sodn = sumOfDigits(n)
|
||||||
|
p = 11
|
||||||
|
while True:
|
||||||
|
if sodn == sumOfDigits(n * p):
|
||||||
|
print(p)
|
||||||
|
break
|
||||||
|
p += 1
|
||||||
|
n = int(input())
|
||||||
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")
|
||||||
2
kornislav.py
Normal file
2
kornislav.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ints = sorted(list(map(int, input().split())))
|
||||||
|
print(ints[0] * ints[2])
|
||||||
7
moderatepace.py
Normal file
7
moderatepace.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
n = int(input())
|
||||||
|
k = list(map(int, input().split()))
|
||||||
|
a = list(map(int, input().split()))
|
||||||
|
b = list(map(int, input().split()))
|
||||||
|
|
||||||
|
for i in range(n):
|
||||||
|
print(f"{sorted([k[i], a[i], b[i]])[1]} ", end="")
|
||||||
7
sevenwonders.py
Normal file
7
sevenwonders.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
s = input().strip()
|
||||||
|
|
||||||
|
t = s.count("T")
|
||||||
|
c = s.count("C")
|
||||||
|
g = s.count("G")
|
||||||
|
|
||||||
|
print(t**2 + c**2 + g**2 + (min((t, c, g)) * 7))
|
||||||
2
thelastproblem.py
Normal file
2
thelastproblem.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
s = input()
|
||||||
|
print(f"Thank you, {s}, and farewell!")
|
||||||
Reference in New Issue
Block a user