Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
PlabonKumarsaha authored Aug 13, 2019
1 parent a2da6b5 commit 0dbe71c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions UVA/UVA10329.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
ll n;
while(cin>>n && n!=-1){
while(n%2==0){
cout<<" 2"<<endl;
n/=2;
}
for(ll i=3;i*i<=n;i+=2){
while(n%i==0){
n/=i;
cout<<" "<<i<<endl;
}
}
if(n>1)cout<<" "<<n<<endl;
cout<<endl;
}
return 0;
}

0 comments on commit 0dbe71c

Please sign in to comment.