| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 8195 | admin | 分解质因数 | C++ | Accepted | 100 | 339 MS | 252 KB | 523 | 2025-03-28 18:46:57 |
#include <bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; for (int i = n;i<=m;i++){ int d = 0; for (int j = 2;j<i;j++){ if (i % j == 0){ d = 1; break; } } if (d == 0){ cout<<i<<"="<<i<<endl; } else{ cout<<i<<"="; int k = 2; int c = i; while (1){ while (c % k == 0){ cout<<k; c = c / k; if (c != 1) cout<<"*"; } if (c == 1) { cout<<endl; break; } k++; } } } return 0; }