Skip to content
Snippets Groups Projects
Commit 191b1bd1 authored by hacker717's avatar hacker717
Browse files

Коммит main в маи

parent 6b4210c4
No related branches found
No related tags found
No related merge requests found
n = int(input())
s = input()
for _ in range(n):
print(f'Я больше никогда не буду писать "{s}"!')
\ No newline at end of file
# скорость ребёнка = 0.5 колбаса/мин
t, kid_c = int(input()), int(input())
print(int(0.5 * t * kid_c))
\ No newline at end of file
name = input("Как Вас зовут?\n")
print(f"Здравствуйте, {name}!")
status = input("Как дела?\n")
if status == "хорошо":
print("Я за вас рада!")
else:
print("Всё наладится!")
\ No newline at end of file
n = int(input())
s1 = ((n % 100) // 10) + (n % 10)
s2 = (n // 100) + ((n % 100) // 10)
print(max(s1, s2), min(s1, s2), sep="")
\ No newline at end of file
arr = [int(i) for i in input()]
arr.sort()
if arr[0] + arr[2] == arr[1] * 2:
print("YES")
else:
print("NO")
\ No newline at end of file
arr = [int(input()) for _ in range(3)]
summ = sum(arr)
f = True
for i in arr:
if i >= summ - i:
f = False
if f:
print("YES")
else:
print("NO")
\ No newline at end of file
arr = [input() for _ in range(3)]
for i in arr[0]:
if i in arr[1] and i in arr[2]:
print(i)
break
\ No newline at end of file
num = input()
arr = []
arrtest = [num[0] + num[1], num[1] + num[0], num[1] + num[2], num[2] + num[1], num[0] + num[2], num[2] + num[0]]
for i in arrtest:
if int(i) >= 10:
arr.append(int(i))
print(min(arr), max(arr))
\ No newline at end of file
a, b = input(), input()
nums = [int(i) for i in sorted([a[0], a[1], b[0], b[1]])]
print(f"{nums[3]}{(nums[1] + nums[2]) % 10}{nums[0]}")
\ No newline at end of file
names = ("Петя", "Вася", "Толя")
speed = {int(input()): names[i] for i in range(3)}
text = []
speed_list = list(speed.keys())
speed_sorted = sorted(speed_list)
text = ["", "", "", " II I III "]
text[0] = (10 * " " + speed[speed_sorted[2]] + " " * 10)
text[1] = (2 * " " + speed[speed_sorted[1]] + " " * 18)
text[2] = (18 * " " + speed[speed_sorted[0]] + " " * 2)
print(*text, sep="\n")
\ No newline at end of file
a, b, c = [float(input()) for _ in range(3)]
if a == b == c == 0:
print("Infinite solutions")
elif a == b == 0:
print("No solution")
elif a == 0:
x = (-1 * c) / b
print("%.2f" % x)
else:
d = b ** 2 - 4 * a * c
if d > 0:
x1 = min((-1 * b + d ** 0.5) / (2 * a), (-1 * b - d ** 0.5) / (2 * a))
x2 = max((-1 * b + d ** 0.5) / (2 * a), (-1 * b - d ** 0.5) / (2 * a))
print("%.2f" % x1, "%.2f" % x2)
elif d == 0:
x = (-1 * b) / (2 * a)
print("%.2f" % x)
elif d < 0:
print("No solution")
\ No newline at end of file
a, b, c = sorted([int(input()) for _ in range(3)])
if (a ** 2 + b ** 2 == c ** 2):
print("100%")
elif (a ** 2 + b ** 2 < c ** 2):
print("велика")
else:
print("крайне мала")
\ No newline at end of file
x, y = float(input()), float(input())
if x ** 2 + y ** 2 > 100:
print("Вы вышли в море и рискуете быть съеденным акулой!")
else:
if x >= 0 and y >= 0:
if x ** 2 + y ** 2 <= 25:
print("Опасность! Покиньте зону как можно скорее!")
else:
print("Зона безопасна. Продолжайте работу.")
elif x < 0 and y > 0:
if y > 5:
print("Зона безопасна. Продолжайте работу.")
else:
if y > 5 / 3 * x + 35 / 3:
print("Зона безопасна. Продолжайте работу.")
else:
print("Опасность! Покиньте зону как можно скорее!")
elif y < 0:
if y < 0.25 * x ** 2 + 0.5 * x - 8.75:
print("Зона безопасна. Продолжайте работу.")
else:
print("Опасность! Покиньте зону как можно скорее!")
\ No newline at end of file
a, b = int(input()), int(input())
if a > b:
print("Петя")
else:
print("Вася")
\ No newline at end of file
arr = sorted([input() for _ in range(3)])
for s in arr:
if "зайка" in s:
print(s, len(s))
break
\ No newline at end of file
This diff is collapsed.
a, b, c = int(input()), int(input()), int(input())
m = max(a, b, c)
if a == m:
print("Петя")
elif b == m:
print("Вася")
elif c == m:
print("Толя")
\ No newline at end of file
a, b, c = int(input()), int(input()), int(input())
names = ["Петя", "Вася", "Толя"]
s_d = [a, b, c]
cnt = 1
for speed in sorted([a, b, c], reverse=True):
print(f"{cnt}. {names[s_d.index(speed)]}")
cnt += 1
\ No newline at end of file
2.2/5.py 0 → 100644
p, v = 7, 6
p -= 1
v += 3
v += 3
n, m = int(input()), int(input())
p += n
v += m
if p > v:
print("Петя")
else:
print("Вася")
\ No newline at end of file
2.2/6.py 0 → 100644
year = int(input())
if year % 400 == 0:
print("YES")
else:
if year % 100 == 0:
print("NO")
else:
if year % 4 == 0:
print("YES")
else:
print("NO")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment