0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-03 18:56:26 +00:00
Baoshuo Ren 2021-08-19 16:50:00 +08:00 committed by Baoshuo Ren
parent 737db35706
commit d71d5e8ad8
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

27
AcWing/867/867.cpp Normal file
View File

@ -0,0 +1,27 @@
#include <bits/stdc++.h>
using namespace std;
int n, a;
int main() {
cin >> n;
while (n--) {
cin >> a;
for (int i = 2; i * i <= a; i++) {
if (a % i == 0) {
int s = 0;
while (a % i == 0) {
a /= i;
s++;
}
cout << i << ' ' << s << endl;
}
}
if (a > 1) {
cout << a << ' ' << 1 << endl;
}
cout << endl;
}
return 0;
}