提交时间:2023-08-22 16:03:50

运行 ID: 99281

#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; cout << n << "="; for(int i = 2; i <= n; i++){ if(i == n){ cout << n * 1; break; } while(n % i == 0){ n /= i; if(n != 1) cout << i << "*"; else cout << i; } } }