day = int(input("Введите день рождения: "))
month = int(input("Введите месяц рождения: "))
year = int(input("Введите год рождения: "))


def get_sum_of_all_digits(n):
    res = 0
    while n > 0:
        res += n % 10
        n //= 10
    
    return res


def find_first_digit(p):
    while p >= 10:
        p % 10
        p //= 10

    return p


def get_number_length(che):
    res1 = 0
    while che > 0:
        res1 += 1
        che //= 10
    return res1


ch0 = get_sum_of_all_digits(day) + get_sum_of_all_digits(month)
year = get_sum_of_all_digits(year)

ch1 = ch0 + year
ch2 = get_sum_of_all_digits(ch1)
ch3 = ch1 - (find_first_digit(day) * 2)
ch4 = get_sum_of_all_digits(ch3)

chpif = get_number_length(day) + 2 + 4 + get_number_length(ch1) + get_number_length(ch2) + get_number_length(ch3) + get_number_length(
    ch4)
print(ch1, ch2, ch3, ch4)
print(chpif)



@@ -130,16 +130,18 @@
 : %22))%0A%0A%0A
+%0A%0A
 def get_
@@ -230,20 +230,16 @@
  //= 10%0A
-    
 %0A    ret
@@ -455,16 +455,1006 @@
  res1%0A%0A%0A
+def count_the_number_of_each_digit(digit):%0A    control_array = %5B0,0, 0, 0, 0, 0, 0, 0, 0, 0%5D%0A    while digit %3E 0:%0A        res = digit %25 10%0A        digit //= 10%0A%0A        if res == 0:%0A            control_array%5B0%5D += 1%0A        elif res == 1:%0A            control_array%5B1%5D += 1%0A        elif res == 2:%0A            control_array%5B2%5D += 1%0A        elif res == 3:%0A            control_array%5B3%5D += 1%0A        elif res == 4:%0A            control_array%5B4%5D += 1%0A        elif res == 5:%0A            control_array%5B5%5D += 1%0A        elif res == 6:%0A            control_array%5B6%5D += 1%0A        elif res == 7:%0A            control_array%5B7%5D += 1%0A        elif res == 8:%0A            control_array%5B8%5D += 1%0A        else:%0A            control_array%5B9%5D += 1%0A%0A    return control_array%0A%0A%0Adef count_array(mas1, mas2, mas3, mas4, mas5, mas6, mas7):%0A    res_mas = %5B0, 0, 0, 0, 0, 0, 0, 0, 0, 0%5D%0A    for i in range(0, 10):%0A        res_mas%5Bi%5D += mas1%5Bi%5D + mas2%5Bi%5D + mas3%5Bi%5D + mas4%5Bi%5D + mas5%5Bi%5D + mas6%5Bi%5D + mas7%5Bi%5D%0A    return res_mas%0A%0A%0A
 ch0 = ge
@@ -1509,20 +1509,21 @@
 (month)%0A
-year
+ch0_0
  = get_s
@@ -1558,20 +1558,21 @@
 = ch0 + 
-year
+ch0_0
 %0Ach2 = g
@@ -1780,16 +1780,21 @@
 _length(
+%0A    
 ch3) + g
@@ -1824,45 +1824,450 @@
 h4)%0A
+%0A
 print(c
-h1, ch2, ch3, ch4)%0Aprint(chpif)%0A%0A
+ount_array(count_the_number_of_each_digit(day),%0A                  count_the_number_of_each_digit(month),%0A                  count_the_number_of_each_digit(year),%0A                  count_the_number_of_each_digit(ch1),%0A                  count_the_number_of_each_digit(ch2),%0A                  count_the_number_of_each_digit(ch3),%0A                  count_the_number_of_each_digit(ch4)))%0A#print(ch4)%0A#print(count_the_number_of_each_digit(ch4))
 %0A

Add counting of the pythagoras square