-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1792.cpp
More file actions
39 lines (33 loc) · 789 Bytes
/
1792.cpp
File metadata and controls
39 lines (33 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*************************************************************************
> File Name: 1792.cpp
> Author: dulun
> Mail: [email protected]
> Created Time: 2016年06月14日 星期二 21时12分31秒
************************************************************************/
#include<iostream>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<algorithm>
#define LL long long
using namespace std;
const int N = 50086;
LL a[N];
int main()
{
LL n;
cin >> n;
cout << n << "=";
int x = 2;
while(n != 1)
{
if(n % x == 0 && n / x != 1 )
{
n /= x;
cout << x << "*";
}
if(n % x == 0 && n / x == 1) n /= x , cout << x;
if(n % x != 0) x++;
}
return 0;
}