Ответ:
Задание 1:
print(max(map(int, list(input()))))
Задание 2:
count = 0
for i in list(map(int, input().split()[:-1])):
if (i % 2) != 0: count+=1
print(count)
Объяснение:
Python 3.10
1)
n = int(input())
max_digit = 0
while n > 0:
if n % 10 > max_digit:
max_digit = n % 10
n //= 10
print(max_digit)
2)
n_list = input().split()[:-1]
i = 0
while i <= len(n_list) - 1:
if int(n_list[i]) % 2 != 0:
count += 1
i += 1
3)
N = int(input())
first = 1
second = 1
i = 2
while N != second:
first, second = second, first + second
print(i)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
Задание 1:
print(max(map(int, list(input()))))
Задание 2:
count = 0
for i in list(map(int, input().split()[:-1])):
if (i % 2) != 0: count+=1
print(count)
Verified answer
Ответ:
Объяснение:
Python 3.10
1)
n = int(input())
max_digit = 0
while n > 0:
if n % 10 > max_digit:
max_digit = n % 10
n //= 10
print(max_digit)
2)
n_list = input().split()[:-1]
i = 0
count = 0
while i <= len(n_list) - 1:
if int(n_list[i]) % 2 != 0:
count += 1
i += 1
print(count)
3)
N = int(input())
first = 1
second = 1
i = 2
while N != second:
first, second = second, first + second
i += 1
print(i)