import math
p = int(
b = false
for i in range(1, p ** 2):
gip = (p ** 2) + (i ** 2)
if math.sqrt(gip) % 1 == 0:
b = true
if int(math.sqrt(gip)) ! = p:
print(int(math.sqrt(
if b == false:
print(-1)
# что-то типо этого, но не проходит по времени. надо смотреть диапазон. может если кто дорешает, ответьте. а так всё норм работает)
для твоего образца.
function cat(name, age) {
this.excuses = ['пнх', 'схб' /*здесь можно написать отмазы ленивого кота*/];
this.name = name;
this.age = age;
this.прыжков = 0;
}
cat.prototype = {
sayhello: function () { console.log("hello! my name is " + this.name); },
jump: function (height) {
if (this.прыжков > 3) console.log(this.excuses[math.random() * this.excuses.length | 0]);
else console.log(height > this.age ? "nonono i'm too young. bro! " : "jump");
this.прыжков++;
}
};
a = float(input(' 1-го судьи: '))
b = float(input(' 2-го судьи: '))
c = float(input(' 3-го судьи: '))
d = float(input(' 4-го судьи: '))
e = float(input(' 5-го судьи: '))
f = float(input(' 6-го судьи: '))
g = float(input(' 7-го судьи: '))
h = float(input(' 8-го судьи: '))
i = float(input(' 9-го судьи: '))
j = float(input(' 10-го судьи: '))
all_balls = []
all_balls.append(a)
all_balls.append(b)
all_balls.append(c)
all_balls.append(d)
all_balls.append(e)
all_balls.append(f)
all_balls.append(g)
all_balls.append(h)
all_balls.append(i)
all_balls.append(j)
max_ball = max(all_balls)
min_ball = min(all_balls)
ball_sred = (max_ball + min_ball) / 2
print(f'Ваша оценка: {ball_sred}')
Объяснение: