#include<iostream>
using namespace std;
int main()
{
char s1[11];
char s2[11];
while (cin >> s1 >> s2)
{
int ans = 0;
for (int i = 0; s1[i] != 0; i++) //字符串判断标志
{
for (int j = 0; s2[j] != 0; j++)
{
ans += (s1[i] - ‘0‘)*(s2[j] - ‘0‘);
}
}
cout << ans << endl;
}
}
时间: 2024-12-25 15:36:13