12.19

include

include

using namespace std;

int main() {
int a1, a2, n;
cin >> a1 >> a2 >> n;
vector seq;
seq.push_back(a1);
if (n > 1) {
seq.push_back(a2);
}
int i = 1;
while (seq.size() < n) {
int product = seq[i - 1] * seq[i];
if (product < 10) {
seq.push_back(product);
} else {
seq.push_back(product / 10);
seq.push_back(product % 10);
}
i++;
}
for (int j = 0; j < n; j++) {
if (j > 0) {
cout << " ";
}
cout << seq[j];
}
return 0;
}

posted @ 2025-12-22 08:17  Cx330。  阅读(6)  评论(0)    收藏  举报