2 条题解
-
3
#include <bits/stdc++.h> #define endl '\n' #define int long long using namespace std; int t, x; void solve() { cin >> x; for(int i = 2; i * i <= x; i++) { if(x % i == 0) { cout << i << " "; while(x % i == 0) { x /= i; } } } if(x != 1) { cout << x << " "; } cout << endl; } signed main() { ios::sync_with_stdio(false); cin.tie(0); cin >> t; while(t--) { solve(); } }
信息
- ID
- 1027
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 9
- 标签
- 递交数
- 327
- 已通过
- 25
- 上传者