пусть, ввели число N, тогда
d = N % 10
N = N / 10
c = N % 10
b = N % 10
a = N / 10
Выводим a * b + c * d
x = abs(int(input()))
c4 = x%10
c3= (x//10)%10
c2 = (x//100)%10
c1 = (x//1000)%10
print(c1*c2+c3*c4)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
пусть, ввели число N, тогда
d = N % 10
N = N / 10
c = N % 10
N = N / 10
b = N % 10
a = N / 10
Выводим a * b + c * d
x = abs(int(input()))
c4 = x%10
c3= (x//10)%10
c2 = (x//100)%10
c1 = (x//1000)%10
print(c1*c2+c3*c4)