#include <stdio.h> #include <string.h> #define MAX 10 int main(void) { int answr = 0; char s1[MAX], s2[MAX]; scanf("%s %s", s1, s2); for (short i = 0; i < strlen(s1); i++) { for (short j = 0; j < strlen(s2); j++) { answr += (s1[i] - '0') * (s2[j] - '0'); } } printf("%d\n", answr); return 0; }