Определи фрагмент алгоритма по трассировочной таблице. n = int(input()) count = 0 while n != 0: count += 1 n //= 2 print(count) n = int(input()) count = 0 while n != 0: count *= n % 10 n //= 10 print(count) n = int(input()) count = 0 while n != 0: count += n % 10 n //= 10 print(count) n = int(input()) count = 0 while n != 0: count += n % 2 n //= 2 print(count)
Задание

Определи фрагмент алгоритма по трассировочной таблице.

Illustration

Выбери верный вариант.

  • n = int(input())

count = 0

while n != 0:

count += 1

n //= 2

print(count)

  • n = int(input())

count = 0

while n != 0:

count *= n % 10

n //= 10

print(count)

  • n = int(input())

count = 0

while n != 0:

count += n % 10

n //= 10

print(count)

  • n = int(input())

count = 0

while n != 0:

count += n % 2

n //= 2

print(count)