#include <bits/stdc++.h>
using namespace std;
void zh(int n) {
int f = 1;
for (int i = 2; i * i <= n; i++) {
while (n % i == 0) {
if (!f) {
cout << '*';
}
f = 0;
cout << i;
n /= i;
}
}
if (n > 1) {
if (!f) {
cout << '*';
}
cout << n;
}
}
int main() {
int a, b;
cin >> a >> b;
for (int i = a; i <= b; i++) {
cout << i << '=';
zh(i);
cout << endl;
}
return 0;
}
全部回复 共 0 条
还没有人回复。往下写第一条。
发表回复
登录后即可回复本帖,与出题人和同学一起讨论。
登录