1 solutions
-
0
#include <iostream> #include <bits/stdc++.h> #include <math.h> using namespace std; int main() { int l,r; cin >> l >> r; for(int i = l ;i <= r ;i++){ cout << i << "="; int m = i; int flag = 0; int j = 2; do{ if(m % j == 0){ m = m/j; if(flag != 0){ cout << "*"; } cout << j; j = 2; flag++; }else{ j++; } }while(m != 1); cout << "\n"; } return 0; }
- 1
Information
- ID
- 1825
- Time
- 1000ms
- Memory
- 512MiB
- Difficulty
- 9
- Tags
- # Submissions
- 12
- Accepted
- 5
- Uploaded By