# include<iostream>
# include<string>
# include<vector>
# include<algorithm>
# include<cmath>
# include<cstdio>
# include<map>
# include<stack>
using namespace std;
vector<int> res1;
vector<int> res2;
void print(vector<int> res) {
for ( int i = 0; i <= res.size() - 1 ; i++) {
cout << res[i] << " ";
}
cout << endl;
}
int getResult(int a, int b) {
while ( a > 0) {
res1.push_back(a % 10); // 1234 -> 4 3 2 1
a /= 10;
}
reverse(res1.begin(),res1.end());
while (b > 0) {
res2.push_back(b % 10); // 4 3 2 1
b /= 10;
}
reverse(res2.begin(),res2.end());
// print(res1);
// print(res2);
int res = 0;
for ( int i = 0; i <= res1.size() - 1 ; i ++) {
for ( int j = 0; j <= res2.size() - 1 ; j++) {
//cout << res1[i] * res2[12j] << " ";
res += res1[i] * res2[j];
}
}
return res;
}
int main() {
int a, b;
cin >> a >> b;
cout << getResult(a, b) << endl;
}
bijingrui 发布了20 篇原创文章 · 获赞 0 · 访问量 1554 私信 关注