Const n = 5; var i: integer; a: array[1..n * 2 + 1] of integer; begin writeln('исходный массив: '); for i : = 1 to 2 * n do begin a[i] : = random(99) + 1; write(a[i] : 5); end; for i : = 2 * n + 1 downto n + 1 do a[i] : = a[i - 1]; a[n + 1] : = 0; writeln(); writeln('полученный массив: '); for i : = 1 to 2 * n + 1 do write(a[i] : 5); end.
Python
n=int(input())
if n>1 and n<10 or n==1:
print(1)
elif n>10 and n<100 or n==10 :
print(2)
elif n>100 and n<1000 or n==100 :
print(3)
elif n>1000 and n<10000 or n==1000:
print(4)
elif n>10000 and n<100000 or n==10000:
print(5)
elif n>100000 and n<1000000 or n==100000:
print(6)
elif n>1000000 and n<10000000 or n==1000000:
print(7)
elif n>10000000 and n<100000000 or n==10000000:
print(8)
elif n>100000000 and n<1000000000 or n==100000000:
print(9)
elif n>1000000000 and n<10000000000 or n==1000000000:
print(10)
else:
print(0)
СДЕЛАЙ ОТВЕТ ЛУЧШИМ!