#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
struct bign {
int d[1000];
int len;
bign() {
memset(d, 0, sizeof(d));
len = 0;
}
};
bign change(char str[]) {
bign a;
a.len = strlen(str);
for (int i = 0; i < a.len; i++) {
a.d[i] = str[a.len - 1 - i] - '0';
}
return a;
}
bign multi(bign a, bign b) {
bign c;
int carry = 0;
for (int i = 0; i < a.len; i++) {
for (int j = 0; j < b.len; j++) {
c.d[i + j] = c.d[i + j] + a.d[i] * b.d[i];
}
}
for (int i = 0; i < (a.len + b.len); i++) {
c.d[i] = (c.d[i] + carry) / 10;
carry = c.d[i] % 10;
}
return c;
}
void print(bign c) {
for (int i = c.len - 1; i >= 0; i--) {
printf("%d", c.d[i]);
}
}
int main() {
char s1[10000], s2[10000];
scanf("%s%s", s1, s2);
bign a = change(s1);
bign b = change(s2);
print(multi(a, b));
return 0;
}
0.0分
0 人评分