ответ:можно ещё так
Объяснение:
a = int(input())
if a % 4 != 0 or a % 100 == 0 and s % 400 !=0:
print('Не високосный')
else:
print('Високосный')
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.прыжков++;
}
};
a1 = int(input())
a2 = a1 % 4
a3 = a1 % 100
a4 = a1 % 400
if a2 == 0 and a3 != 0:
print('Високосный')
elif a4 == 0:
print('Високосный')
else:
print('Не високосный')
Объяснение: