# 2017000, 2024-09-28 12:45:46, PTTTTTTTTTTTTTTTPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n;
if(n>=2){
while(n>1){
for(int d=2;d<=sqrt(n);d++){
if(n%d==0){
cout << d << " ";
n=n/d;
}
}
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017024, 2024-09-28 12:47:47, P---------------PP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n;
if(n>=2){
//while(n>1){
for(int d=2;d<=sqrt(n);d++){
if(n%d==0){
cout << d << " ";
n=n/d;
}
}
//}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017037, 2024-09-28 12:48:45, P---------------PP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
cin >> n;
if(n>=2){
//while(n>1){
for(long long d=2;d<=sqrt(n);d++){
if(n%d==0){
cout << d << " ";
n=n/d;
}
}
//}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017053, 2024-09-28 12:50:19, P---------------PP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
cin >> n;
if(n>=2){
//while(n>1){
for(long long d=2;d<=sqrt(n);d++){
if(n%d==0){
cout << d << " ";
n=n/d;
}
else break;
}
//}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017301, 2024-09-28 13:16:11, P---------------PP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
cin >> n;
if(n>=2){
for(long long d=2;d<=sqrt(n);d++){
if(n%d==0){
n=n/d;
cout << d << " ";
}
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017368, 2024-09-28 13:23:18, PTTxTTxTTTxxTxxxPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
long long d=2;
cin >> n;
if(n>=2){
while(n>1){
if(d*d<=n){
if(n%d==0){
n=n/d;
cout << d<< " ";
}else d++;
}cout << n;
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017378, 2024-09-28 13:24:46, PTTxTTxTTTxxTxxxPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
long long d=2;
cin >> n;
if(n>=2){
while(n>1){
if(d*d<=n){
if(n%d==0){
n=n/d;
cout << d<< " ";
}else d++;
}else cout << n;
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017625, 2024-09-28 13:51:41, Compilation error (0%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
long long d=2;
cin >> n;
if(n>=2){
while(n>1){
if(d*d<=n){
while(n%d==0){
n=n/d;
cout << d<< " ";
}else d++;
}else cout << n;
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017634, 2024-09-28 13:52:34, PTPxTPTPTPxxPxxxPP (44%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
long long d=2;
cin >> n;
if(n>=2){
while(n>1){
if(d*d<=n){
while(n%d==0){
n=n/d;
cout << d<< " ";
} d++;
}else cout << n;
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017647, 2024-09-28 13:53:40, PTPxTPxPTPxxPxxxPP (44%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
long long d=2;
cin >> n;
if(n>=2){
while(n>1){
if(d*d<=n){
while(n%d==0){
n=n/d;
cout << d<< " ";
} d++;
}else cout << n;
}
return 0;
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017673, 2024-09-28 13:56:07, PTPxTPxPTPxxPxxxPP (44%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
long long d=2;
cin >> n;
if(n>=2){
while(n>1){
if(pow(d,2)<=n){
while(n%d==0){
n=n/d;
cout << d<< " ";
} d++;
}else cout << n;
}
return 0;
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017679, 2024-09-28 13:56:55, PTPxTPxPTPxxxxxxPP (38%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
int d=2;
cin >> n;
if(n>=2){
while(n>1){
if(pow(d,2)<=n){
while(n%d==0){
n=n/d;
cout << d<< " ";
} d++;
}else cout << n;
}
return 0;
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017683, 2024-09-28 13:57:15, PTPxTPxPTPxxPxxxPP (44%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
long long d=2;
cin >> n;
if(n>=2){
while(n>1){
if(pow(d,2)<=n){
while(n%d==0){
n=n/d;
cout << d<< " ";
} d++;
}else cout << n;
}
return 0;
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017990, 2024-09-28 14:23:28, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
long long d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(pow(d,2)>n){
cout << n;
break;
}
else {
while(n%d==0){
n=n/d;
cout << d<< " ";
} d++;
}
}
return 0;
}
} |
# 2015564, 2024-09-28 10:18:30, PP--------TTTTTTPP (22%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>> n;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(n>1){
if(d*d>n){
while(d%2==0){
d=d/2;
cout << 2 <<" ";
}
while(d%3==0){
d=d/3;
cout << 3 <<" ";
}
while(d%5==0){
d=d/5;
cout << 5 <<" ";
} while(d%7==0){
d=d/7;
cout << 7 <<" ";
}
while(d%11==0){
d=d/11;
cout << 11 <<" ";
}
while(d%13==0){
d=d/13;
cout << 13 <<" ";
}
return 0;
}
else{
while(n%d==0){
n/=d;
while(n%2==0){
n=n/2;
cout << 2 <<" ";
}
while(n%3==0){
n=n/3;
cout << 3 <<" ";
}
while(n%5==0){
n=n/5;
cout << 5 <<" ";
} while(n%7==0){
n=n/7;
cout << 7 <<" ";
}
while(n%11==0){
n=n/11;
cout << 11 <<" ";
}
while(n%13==0){
n=n/13;
cout << 13 <<" ";
}
return 0;
}
d+=1;
}
}
}
return 0;
} | # 2015924, 2024-09-28 10:56:50, P---------TTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>> n;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(n>1){
if(d*d>n){
while(d%2==0){
d=d/2;
cout << 2 <<" ";
}
while(d%3==0){
d=d/3;
cout << 3 <<" ";
}
while(d%5==0){
d=d/5;
cout << 5 <<" ";
} while(d%7==0){
d=d/7;
cout << 7 <<" ";
}
while(d%11==0){
d=d/11;
cout << 11 <<" ";
}
while(d%13==0){
d=d/13;
cout << 13 <<" ";
}
cout<< "d";
return 0;
}
else{
while(n%d==0){
n/=d;
while(n%2==0){
n=n/2;
cout << 2 <<" ";
}
while(n%3==0){
n=n/3;
cout << 3 <<" ";
}
while(n%5==0){
n=n/5;
cout << 5 <<" ";
} while(n%7==0){
n=n/7;
cout << 7 <<" ";
}
while(n%11==0){
n=n/11;
cout << 11 <<" ";
}
while(n%13==0){
n=n/13;
cout << 13 <<" ";
}
cout<< "n";
return 0;
}
d+=1;
}
}
}
return 0;
} | # 2015930, 2024-09-28 10:57:09, PP--------TTTTTTPP (22%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>> n;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(n>1){
if(d*d>n){
while(d%2==0){
d=d/2;
cout << 2 <<" ";
}
while(d%3==0){
d=d/3;
cout << 3 <<" ";
}
while(d%5==0){
d=d/5;
cout << 5 <<" ";
} while(d%7==0){
d=d/7;
cout << 7 <<" ";
}
while(d%11==0){
d=d/11;
cout << 11 <<" ";
}
while(d%13==0){
d=d/13;
cout << 13 <<" ";
}
return 0;
}
else{
while(n%d==0){
n/=d;
while(n%2==0){
n=n/2;
cout << 2 <<" ";
}
while(n%3==0){
n=n/3;
cout << 3 <<" ";
}
while(n%5==0){
n=n/5;
cout << 5 <<" ";
} while(n%7==0){
n=n/7;
cout << 7 <<" ";
}
while(n%11==0){
n=n/11;
cout << 11 <<" ";
}
while(n%13==0){
n=n/13;
cout << 13 <<" ";
}
return 0;
}
d+=1;
}
}
}
return 0;
} | # 2016175, 2024-09-28 11:20:46, PTPTTPTPTPTTTTTTPP (38%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout <<n <<" ";
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
return 0;
} | # 2016211, 2024-09-28 11:23:55, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout <<n <<" ";
break;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
return 0;
} | # 2016221, 2024-09-28 11:24:56, PPPPPPP-P-TTTTTTPP (55%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout <<n <<" ";
break;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
break;
}
d+=1;
}
}
}
return 0;
} | # 2016226, 2024-09-28 11:25:15, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout <<n <<" ";
break;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
return 0;
} | # 2016235, 2024-09-28 11:26:35, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
while(n>1)
{
if(d*d>n)
{
cout <<n <<" ";
return 0;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
return 0;
} | # 2016256, 2024-09-28 11:29:04, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n <<" ";
return 0;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
continue;
}
d+=1;
}
}
return 0;
}
return 0;
} | # 2016284, 2024-09-28 11:31:12, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n <<" ";
return 0;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
}
if(n%d!=0){
d+=1;
}
}
}
return 0;
}
return 0;
} | # 2016293, 2024-09-28 11:32:04, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n <<" ";
return 0;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
continue;
}
if(n%d!=0){
d+=1;
}
}
}
return 0;
}
return 0;
} | # 2016298, 2024-09-28 11:32:16, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n <<" ";
return 0;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
break;
}
if(n%d!=0){
d+=1;
}
}
}
return 0;
}
return 0;
} | # 2016302, 2024-09-28 11:32:31, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n <<" ";
return 0;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
}
if(n%d!=0){
d+=1;
}
}
}
return 0;
}
return 0;
} | # 2016329, 2024-09-28 11:34:31, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n <<" ";
return 0;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
}
if(n%d!=0){
d+=1;
}
}
}
return 0;
}
return 0;
} |
# 2014863, 2024-09-28 09:11:12, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d!=0)
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2014898, 2024-09-28 09:13:26, -PPPPPPPPPPTPPPP-T (77%)
#include<iostream>
using namespace std;
int main()
{
unsigned long long n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d!=0)
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2014899, 2024-09-28 09:13:30, -PPPPPPPPPPTPPPP-T (77%)
#include<iostream>
using namespace std;
int main()
{
unsigned long long n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d!=0)
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2015172, 2024-09-28 09:42:02, PPPPPPPPPPPTPPPP-T (83%)
#include<iostream>
using namespace std;
int main()
{
unsigned long long n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d!=0)
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2015399, 2024-09-28 10:02:13, -PPPPPPPPPPTPPPP-T (77%)
#include<iostream>
using namespace std;
int main()
{
unsigned long long n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d!=0)
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2015416, 2024-09-28 10:03:00, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d!=0)
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2016517, 2024-09-28 11:47:11, Compilation error (0%)
#include<iostream>
using namespace std;
int main()
{
long double n;
cin >> n;
int d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d!=0)
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2016525, 2024-09-28 11:47:56, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d!=0)
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2016530, 2024-09-28 11:48:09, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d!=0)
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2016578, 2024-09-28 11:50:50, -P-P--P----T------ (16%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while(n>1)
{
d+=1;
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(!(n%d==0))
{
d+=1;
}
n/=d;
cout << d << " ";
}
}
}
} | # 2016637, 2024-09-28 11:53:45, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while(n>1)
{
if(d*d<=n)
{
while(!(n%d==0))
{
d+=1;
}
n/=d;
cout << d << " ";
}
else
{
cout << n << " ";
break;
}
}
}
} | # 2016790, 2024-09-28 11:59:24, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d=2;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if(d*d>n)
{
cout << n << " ";
break;
}
else
{
while(n%d==0)
{
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
} |
# 2016828, 2024-09-28 12:28:22, PPP--P-P-P--P---PP (50%)
#include <iostream>
using namespace std;
int main(){
long n;
long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
cout<<d;
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else{
d+=1;
}
}
}
}
return 0;
} | # 2016846, 2024-09-28 12:30:08, P---------------PP (16%)
#include <iostream>
using namespace std;
int main(){
long n;
long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else{
d+=1;
}
}
}
}
return 0;
} | # 2016860, 2024-09-28 12:31:43, P-P--P-P-P--P---PP (44%)
#include <iostream>
using namespace std;
int main(){
long n;
long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
break;
}else{
while
(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
return 0;
} | # 2016897, 2024-09-28 12:34:48, PPP--P-P-P--P---PP (50%)
#include <iostream>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
cout<<d;
break;
}else{
while
(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
return 0;
} | # 2016912, 2024-09-28 12:35:54, P-P--P-P-P--P---PP (44%)
#include <iostream>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
break;
}else{
while
(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
return 0;
} | # 2016927, 2024-09-28 12:37:02, P-P--P-P-P--P---PP (44%)
#include <iostream>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
break;
}else{
while
(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
continue;
}
}
}
return 0;
} | # 2016942, 2024-09-28 12:38:26, P-P--P-P-P--P---PP (44%)
#include <iostream>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
break;
}else{
while
(n%d==0){
n/=d;
if(n==1){
cout<<d;
break;
}else{
cout<<d<<" ";
}
}
d+=1;
}
}
}
return 0;
} | # 2016951, 2024-09-28 12:38:56, PPP--P-P-P--P---PP (50%)
#include <iostream>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
cout<<d;
break;
}else{
while
(n%d==0){
n/=d;
if(n==1){
cout<<d;
break;
}else{
cout<<d<<" ";
}
}
d+=1;
}
}
}
return 0;
} | # 2017347, 2024-09-28 13:20:28, PPTPTTPTTTTPTTTTPP (38%)
#include <iostream>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
cout<<n;
break;
}else{
while
(n%d==0){
cout<<d<<" ";
}
d+=1;
}
}
}
return 0;
} | # 2017355, 2024-09-28 13:21:15, PPTPTTPTTTTPTTTTPP (38%)
#include <iostream>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
cout<<n;
break;
}else{
while
(n%d==0){
cout<<d<<" ";
}
d+=1;
}
}
}
return 0;
} | # 2017366, 2024-09-28 13:23:08, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}else{
while
(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
return 0;
} |
# 2014941, 2024-09-28 09:18:10, -P---------------- (5%)
#include <iostream>
using namespace std;
int main(){
long int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}else{
if(n>1){
if((d*d)>n){
cout<<n;
}else{
if(n%d==0){
n/=d;
cout<<n;
}else {
d+=1;
}
}
}else{
}
}
} | # 2015512, 2024-09-28 10:13:54, PP--------------PP (22%)
#include <iostream>
using namespace std;
int main(){
long int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
if(n>1){
if((d*d)>n){
cout<<d<<" ";
}else{
if(n%d==0){
n/=d;
cout<<n<<" ";
}else {
d+=1;
}
}
}else{
}
}
} | # 2015671, 2024-09-28 10:30:18, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if((d*d)>n){
cout<<n<<" ";
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
} | # 2015676, 2024-09-28 10:31:07, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}else{
while(n>1){
if((d*d)>n){
cout<<n<<" ";
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
} | # 2015678, 2024-09-28 10:31:20, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if((d*d)>n){
cout<<n<<" ";
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
} | # 2015691, 2024-09-28 10:32:27, PPPPPPPPPP-PP-PP-- (77%)
#include <iostream>
using namespace std;
int main(){
unsigned long long int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if((d*d)>n){
cout<<n<<" ";
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
} | # 2015693, 2024-09-28 10:32:46, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if((d*d)>n){
cout<<n<<" ";
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
} | # 2015741, 2024-09-28 10:37:41, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}else{
while(n>1){
if((d*d)>n){
cout<<n<<" ";
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
} | # 2015745, 2024-09-28 10:38:06, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}else{
while(n>1){
if((d*d)>n){
cout<<n<<" ";
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
} | # 2015750, 2024-09-28 10:38:38, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if((d*d)>n){
cout<<n<<" ";
break;
}else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
} |
# 2014978, 2024-09-28 09:22:33, Compilation error (0%)
int main(){
int N,d=2;
cin>>N;
if (N<2){
cout<<"No prime factors for number less than 2";
}
else{
while (true){
if (N>1){
if (d*d>N){
cout<<d<<' ';
break;
}
else{
if (N%d==0){
N /=d;
cout<<d<<' ';
continue;
}
else{
d+=1;
continue;
}
}
}
else{
break;
}
}
}
return 0;
} | # 2015003, 2024-09-28 09:25:43, -PP--P-P-PTTTTTT-- (27%)
#include <iostream>
using namespace std;
int main(){
int N,d=2;
std::cin>>N;
if (N<2){
std::cout<<"No prime factors for number less than 2";
}
else{
while (true){
if (N>1){
if (d*d>N){
std::cout<<d<<' ';
break;
}
else{
if (N%d==0){
N /=d;
std::cout<<d<<' ';
continue;
}
else{
d+=1;
continue;
}
}
}
else{
break;
}
}
}
return 0;
} | # 2015072, 2024-09-28 09:33:22, -PP--P-P-PTTTTTT-- (27%)
#include <iostream>
using namespace std;
int main(){
int N,d=2;
std::cin>>N;
if (N<2){
std::cout<<"No prime factors for number less than 2";
}
else{
while (true){
if (N>1){
if (d*d>N){
std::cout<<d<<' ';
break;
}
else{
if (N%d==0){
N /=d;
std::cout<<d<<' ';
continue;
}
else{
d+=1;
continue;
}
}
}
else{
break;
}
}
}
return 0;
} | # 2015085, 2024-09-28 09:33:50, -PPP-PPP-PTTTTTT-- (38%)
#include <iostream>
using namespace std;
int main(){
int N,d=2;
std::cin>>N;
if (N<2){
std::cout<<"No prime factors for number less than 2";
}
else{
while (true){
if (N>1){
if (d*d>N){
std::cout<<d<<' ';
break;
}
else{
while (true){
if (N%d==0){
N /= d;
std::cout<<d<<' ';
break;
}
else{
d+=1;
}
}
}
}
else{
break;
}
}
}
return 0;
} | # 2015194, 2024-09-28 09:43:29, Compilation error (0%)
include <iostream>
using namespace std;
int main(){
int N,d=2;
std::cin>>N;
if (N<2){
std::cout<<"No prime factors for number less than 2.";
}
else{
while (true){
if (N>1){
if (d*d>N){
std::cout<<d<<' ';
break;
}
else{
while (true){
if (N%d==0){
N /= d;
std::cout<<d<<' ';
break;
}
else{
d += 1;
}
}
}
}
else{
break;
}
}
}
return 0;
} | # 2015200, 2024-09-28 09:44:06, -PPP-PPP-PTTTTTT-- (38%)
#include <iostream>
using namespace std;
int main(){
int N,d=2;
std::cin>>N;
if (N<2){
std::cout<<"No prime factors for number less than 2.";
}
else{
while (true){
if (N>1){
if (d*d>N){
std::cout<<d<<' ';
break;
}
else{
while (true){
if (N%d==0){
N /= d;
std::cout<<d<<' ';
break;
}
else{
d += 1;
}
}
}
}
else{
break;
}
}
}
return 0;
} | # 2015225, 2024-09-28 09:46:57, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std;
int main(){
int N,d=2;
std::cin>>N;
if (N<2){
std::cout<<"No prime factors for number less than 2.";
}
else{
while (true){
if (N>1){
if (d*d>N){
std::cout<<N<<' ';
break;
}
else{
while (true){
if (N%d==0){
N /= d;
std::cout<<d<<' ';
break;
}
else{
d += 1;
}
}
}
}
else{
break;
}
}
}
return 0;
} | # 2015365, 2024-09-28 09:59:03, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std;
int main(){
int N,d=2;
std::cin>>N;
if (N<2){
std::cout<<"No prime factors for number less than 2.";
}
else{
while (true){
if (N>1){
if (d*d>N){
std::cout<<N<<' ';
break;
}
else{
while (true){
if (N%d==0){
N /= d;
std::cout<<d<<' ';
}
else{
d += 1;
break;
}
}
}
}
else{
break;
}
}
}
return 0;
} | # 2016031, 2024-09-28 11:06:00, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main(){
long N,d=2;
cin>>N;
if (N<2){
cout<<"No prime factors for number less than 2.";
}
else{
while (true){
if (N>1){
if (d*d>N){
cout<<N<<' ';
break;
}
else{
while (true){
if (N%d==0){
N /= d;
cout<<d<<' ';
}
else{
d += 1;
break;
}
}
}
}
else{
break;
}
}
}
return 0;
} | # 2016202, 2024-09-28 11:23:14, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long N,d=2;
cin>>N;
if (N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while (true){
if (N>1){
if (d*d>N){
cout<<N<<' ';
break;
}
else{
while (true){
if (N%d==0){
N /= d;
cout<<d<<' ';
}
else{
d += 1;
break;
}
}
}
}
else{
break;
}
}
}
return 0;
} |
# 2017478, 2024-09-28 13:32:29, PP-P--P---xxxxxxxx (22%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long int n, d = 2; cin >> n;
vector<bool> isPrime(n + 1 , true);
string fact = "";
isPrime[0] = isPrime[1] = false;
for(d ; d* d < n; d++){
if(isPrime[d]){
for(long long j = d*d; j < n; j +=d){
isPrime[j] == false;
}
}
}
if(isPrime[n]){
cout << n;
}else{
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
long long int d = 2;
for(long long int i = 2 ; i < n; i ++){
while(n % i == 0){
n/= i;
cout << i << " ";
}
}
}
}
return 0;
} | # 2017485, 2024-09-28 13:33:09, PP-P--P---xxxxxxxx (22%)
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
long long int n, d = 2; cin >> n;
vector<bool> isPrime(n + 1 , true);
string fact = "";
isPrime[0] = isPrime[1] = false;
for(d ; d* d < n; d++){
if(isPrime[d]){
for(long long j = d*d; j < n; j +=d){
isPrime[j] == false;
}
}
}
if(isPrime[n]){
cout << n;
}else{
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
long long int d = 2;
for(long long int i = 2 ; i < n; i ++){
while(n % i == 0){
n/= i;
cout << i << " ";
}
}
}
}
return 0;
} | # 2017937, 2024-09-28 14:18:06, P------P-Pxxxxxxxx (16%)
#include <bits/stdc++.h>
using namespace std;
// ENG_EXAM_WEEK
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
long long int n, d = 2; cin >> n;
vector<bool> isPrime(n + 1 , true);
for(auto x: isPrime){
isPrime[x] = true;
}
string fact = "";
isPrime[0] = isPrime[1] = false;
for(d ; d* d < n; d++){
if(isPrime[d]){
for(long long j = d*d; j < n; j +=d){
isPrime[j] = false;
}
}
}
if(isPrime[n -1]){
cout << n;
}else{
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
long long int d = 2;
for(long long int i = 2 ; i < n; i ++){
while(n % i == 0){
n/= i;
cout << i << " ";
}
}
}
}
return 0;
} | # 2017940, 2024-09-28 14:18:25, P------P-Pxxxxxxxx (16%)
#include <bits/stdc++.h>
using namespace std;
// ENG_EXAM_WEEK
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
long long int n, d = 2; cin >> n;
vector<bool> isPrime(n + 1 , true);
for(auto x: isPrime){
isPrime[x] = true;
}
string fact = "";
isPrime[0] = isPrime[1] = false;
for(d ; d* d < n; d++){
if(isPrime[d]){
for(long long j = d*d; j < n; j +=d){
isPrime[j] = false;
}
}
}
if(isPrime[n -1]){
cout << n;
}else{
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
long long int d = 2;
for(long long int i = 2 ; i < n; i ++){
while(n % i == 0){
n/= i;
cout << i << " ";
}
}
}
}
return 0;
} | # 2017987, 2024-09-28 14:23:04, PTPTTPTPTPTTPTTTPP (44%)
#include <bits/stdc++.h>
using namespace std;
// ENG_EXAM_WEEK
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
long long int n, d = 2; cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while (n > 1)
{
if( d*d > n){
cout << n;
}else{
for(long long int i = 2 ; i < n; i ++){
while(n % i == 0){
n/= i;
cout << i << " ";
}
}
}
}
for(long long int i = 2 ; i < n; i ++){
while(n % i == 0){
n/= i;
cout << i << " ";
}
}
}
return 0;
} | # 2017998, 2024-09-28 14:23:48, PTPTTPTPTPTTPTTTPP (44%)
#include <bits/stdc++.h>
using namespace std;
// ENG_EXAM_WEEK
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
long long int n, d = 2; cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while (n > 1)
{
if( d*d > n){
cout << n;
}else{
for(long long int i = 2 ; i < n; i ++){
while(n % i == 0){
n/= i;
cout << i << " ";
}
}
}
}
}
return 0;
} | # 2018016, 2024-09-28 14:24:53, PPP--P-P-P-TP---PP (50%)
#include <bits/stdc++.h>
using namespace std;
// ENG_EXAM_WEEK
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
long long int n, d = 2; cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
if( d*d > n){
cout << n;
}else{
for(long long int i = 2 ; i < n; i ++){
while(n % i == 0){
n/= i;
cout << i << " ";
}
}
}
}
return 0;
} | # 2018027, 2024-09-28 14:25:46, PPPTTPTPTPTTPTTTPP (50%)
#include <bits/stdc++.h>
using namespace std;
// ENG_EXAM_WEEK
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
long long int n, d = 2; cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while (n > 1)
{
if( d*d > n){
cout << n;
break;
}else{
for(long long int i = 2 ; i < n; i ++){
while(n % i == 0){
n/= i;
cout << i << " ";
}
}
}
}
}
return 0;
} | # 2018055, 2024-09-28 14:29:06, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
// ENG_EXAM_WEEK
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
long long int n, d = 2; cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while (n > 1)
{
if( d*d > n){
cout << n;
break;
}else{
while(n % d == 0){
n/= d;
cout << d << " ";
}
d++;
}
}
}
return 0;
} |
# 2017004, 2024-09-28 12:46:10, PTTxTTxTTTxTTTTTPP (16%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2." ;
}else if(N>1){
while(N>1){
if(d*d > N){
cout << N;
}else if(N% d ==0){
N /= d;
cout << N;
}else{
d += 1;
}
}
}
} | # 2017925, 2024-09-28 14:16:49, PTTxTTxTTTxTTxxxPP (16%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2." ;
}else {
while(N>1){
if(d*d > N){
cout << N;
}else if(N% d ==0){
N /= d;
cout << N;
}else{
d += 1;
}
}
}
} | # 2017934, 2024-09-28 14:17:53, PTTxTTxTTTxTTxxxPP (16%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2." ;
}else {
while(N>1){
if(d*d > N){
cout << N;
}else if(N% d ==0){
N /= d;
cout << N;
}else{
d += 1;
}
}
}
} | # 2018136, 2024-09-28 14:37:03, PPPP--P----T----PP (38%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2." ;
}else {
while(N>1){
if(d*d > N){
cout << N << " ";
break;
}else if(N% d ==0){
N /= d;
cout << N << " ";
}else{
d += 1;
}
}
}
} | # 2018176, 2024-09-28 14:41:05, PP-P--P----T----PP (33%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2." ;
}else {
while(N>1){
if(d*d > N){
cout << N << " ";
break;
}
while(N% d ==0){
N /= d;
}
d += 1;
}
}
} | # 2018204, 2024-09-28 14:43:04, PP-P--P----T----PP (33%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2." ;
}else {
while(N>1){
if(d*d > N){
cout << N << " ";
break;
}
while(N% d ==0){
N /= d;
cout << N << " ";
}
d += 1;
}
}
} | # 2018208, 2024-09-28 14:43:15, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2." ;
}else {
while(N>1){
if(d*d > N){
cout << N << " ";
break;
}
while(N% d ==0){
N /= d;
cout << d << " ";
}
d += 1;
}
}
} | # 2018250, 2024-09-28 14:46:36, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long N;
long long d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2." ;
}else {
while(N>1){
if(d*d > N){
cout << N << " ";
break;
}
while(N% d ==0){
N /= d;
cout << d << " ";
}
d += 1;
}
}
} |
# 2017393, 2024-09-28 13:25:40, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for number less than 2.";
}else{
while(true){
if(N > 1){
if(d*d > N){
cout << N << " ";
break;
}else{
if(N % d == 0){
N /= d;
cout << d << " ";
}else{
d+= 1;
}
}
}else{
break;
}
}
}
return 0;
} | # 2017414, 2024-09-28 13:27:24, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for number less than 2.";
}else{
while(true){
if(N > 1){
if(d*d > N){
cout << N << " ";
break;
}else{
while(true){
if(N % d == 0){
N /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
}
}else{
break;
}
}
}
return 0;
} | # 2017430, 2024-09-28 13:28:41, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while(true){
if(N > 1){
if(d*d > N){
cout << N << " ";
break;
}else{
while(true){
if(N % d == 0){
N /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
}
}else{
break;
}
}
}
return 0;
} | # 2017468, 2024-09-28 13:31:57, PTTTTTTTTTTTTTTTPP (16%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while(true){
if(N > 1){
while(true){
if(d*d > N){
cout << N << " ";
break;
}else{
if(N % d == 0){
N /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
}
}else{
break;
}
}
}
return 0;
} | # 2017495, 2024-09-28 13:34:40, PTPTTPTPTPTTTTTTPP (38%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while(true){
if(N > 1){
while(true){
if(d*d > N){
cout << N << " ";
break;
}else{
while(true){
if(N % d == 0){
N /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
break;
}
}
}else{
break;
}
}
}
return 0;
} | # 2017512, 2024-09-28 13:36:46, PTTTTTTTTTTTTTTTPP (16%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while(true){
if(N > 1){
while(true){
if(d*d > N){
cout << N << " ";
break;
}else{
while(true){
if(N % d == 0){
N /= d;
cout << d << " ";
break;
}else{
d+= 1;
break;
}
}
break;
}
}
}else{
break;
}
}
}
return 0;
} | # 2018336, 2024-09-28 14:53:59, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while(true){
if(N > 1){
if(d*d > N){
cout << N << " ";
break;
}else{
while(true){
if(N % d == 0){
N /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
continue;
}
}else{
break;
}
}
}
return 0;
} | # 2018365, 2024-09-28 14:56:00, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while(true){
if(N > 1){
if(d*d > N){
cout << N << " ";
break;
}else{
while(true){
if(N % d == 0){
N /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
continue;
}
}else{
break;
}
}
}
return 0;
} |
# 2014833, 2024-09-28 09:08:58, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
for (int i = 2; i*i <= n;)
{
if (n % i == 0)
{
cout << i << " ";
n /= i;
}
else
{
i++;
}
}
if (n > 1)
{
cout << n;
}
} | # 2014875, 2024-09-28 09:12:10, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
for (int i = 2; i*i <= n;)
{
if (n % i == 0)
{
cout << i << " ";
n /= i;
}
else
{
++i;
}
}
if (n > 1)
{
cout << n;
}
} | # 2015398, 2024-09-28 10:02:10, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
for (int i = 2; i*i <= n;)
{
if (n % i == 0)
{
cout << i << " ";
n /= i;
}
else
{
++i;
}
}
if (n > 1)
{
cout << n;
}
} | # 2015909, 2024-09-28 10:55:57, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
for (int i = 2; i*i <= n;)
{
if (n % i == 0)
{
cout << i << " ";
n /= i;
}
else
{
++i;
}
}
if (n > 1)
{
cout << n;
}
} | # 2015916, 2024-09-28 10:56:20, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
for (int i = 2; i*i <= n;)
{
if (n % i == 0)
{
cout << i << " ";
n /= i;
}
else
{
++i;
}
}
if (n > 1)
{
cout << n;
}
} | # 2015919, 2024-09-28 10:56:32, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
for (long long i = 2; i*i <= n;)
{
if (n % i == 0)
{
cout << i << " ";
n /= i;
}
else
{
++i;
}
}
if (n > 1)
{
cout << n;
}
} | # 2015962, 2024-09-28 10:59:59, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
for (int i = 2; i * i <= n;)
{
if (n % i == 0)
{
cout << i << " ";
n /= i;
}
else
{
++i;
}
}
if (n > 1)
{
cout << n;
}
} | # 2015968, 2024-09-28 11:00:22, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
for (long long i = 2; i * i <= n;)
{
if (n % i == 0)
{
cout << i << " ";
n /= i;
}
else
{
++i;
}
}
if (n > 1)
{
cout << n;
}
} |
# 2016833, 2024-09-28 12:28:47, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (N > 1) {
if (d*d > N) {
cout << N << endl;
return 0;
}
else {
if (N % d == 0) {
while (N % d == 0) {
N /= d;
cout << d << " ";
}
}
else {
d+=1;
}
}
}
}
cout << endl;
} | # 2016835, 2024-09-28 12:28:56, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (N > 1) {
if (d*d > N) {
cout << N << endl;
return 0;
}
else {
if (N % d == 0) {
while (N % d == 0) {
N /= d;
cout << d << " ";
}
}
else {
d+=1;
}
}
}
}
cout << endl;
} | # 2016863, 2024-09-28 12:31:50, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (N > 1) {
if (d*d > N) {
cout << N << endl;
return 0;
}
else {
while (N % d == 0) {
N /= d;
cout << d << " ";
}
d+=1;
}
}
}
cout << endl;
} | # 2017766, 2024-09-28 14:04:52, PPPPPPPPPP-PP---PP (77%)
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main() {
long N;
cin >> N;
int d = 2;
int index = 0;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
else {
while (N >1) {
if (d*d > N || index > 100) {
cout << N << endl;
return 0;
}
else {
while (N % d == 0) {
N/=d;
index = 0;
cout << d << " ";
}
d+=1;
index++;
}
}
}
cout << endl;
} | # 2017772, 2024-09-28 14:05:07, PPPPPPPPPP-PP-PPPP (88%)
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main() {
long N;
cin >> N;
int d = 2;
int index = 0;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
else {
while (N >1) {
if (d*d > N || index > 1000) {
cout << N << endl;
return 0;
}
else {
while (N % d == 0) {
N/=d;
index = 0;
cout << d << " ";
}
d+=1;
index++;
}
}
}
cout << endl;
} | # 2017777, 2024-09-28 14:05:19, PPPPPPPPPP-PPPPPPP (94%)
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main() {
long N;
cin >> N;
int d = 2;
int index = 0;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
else {
while (N >1) {
if (d*d > N || index > 100000) {
cout << N << endl;
return 0;
}
else {
while (N % d == 0) {
N/=d;
index = 0;
cout << d << " ";
}
d+=1;
index++;
}
}
}
cout << endl;
} | # 2017782, 2024-09-28 14:05:31, PPPPPPPPPP-PPPPPPP (94%)
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main() {
long N;
cin >> N;
int d = 2;
int index = 0;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
else {
while (N >1) {
if (d*d > N || index > 10000000) {
cout << N << endl;
return 0;
}
else {
while (N % d == 0) {
N/=d;
index = 0;
cout << d << " ";
}
d+=1;
index++;
}
}
}
cout << endl;
} | # 2017784, 2024-09-28 14:05:43, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
int main() {
long N;
cin >> N;
int d = 2;
int index = 0;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
else {
while (N >1) {
if (d*d > N || index > 100000000) {
cout << N << endl;
return 0;
}
else {
while (N % d == 0) {
N/=d;
index = 0;
cout << d << " ";
}
d+=1;
index++;
}
}
}
cout << endl;
} |
# 2017253, 2024-09-28 13:11:42, Compilation error (0%)
#include <bits/stdc++.h>
using namespace std;
;
int main()
{
double n,x=1;
cin >> n;
int d = 2;
if (d < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if(n%d==0)
{
n/=d;
// if(x!=1)
// {
// cout << " ";
// }
cout << d << " ";
x++;
}
else d++;
if(d*d>n)
{
cout << n;
break;
}
}
}
return 0;
}
/*
1000000000
*/ | # 2017273, 2024-09-28 13:13:54, --PPPPPPPPTTTTTT-- (44%)
#include <bits/stdc++.h>
using namespace std;
;
int main()
{
int n,x=1;
cin >> n;
int d = 2;
if (d < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if(n % d == 0)
{
n/=d;
// if(x!=1)
// {
// cout << " ";
// }
cout << d << " ";
x++;
}
else d++;
if(d*d>n)
{
cout << n;
break;
}
}
}
return 0;
}
/*
1000000000
*/ | # 2018085, 2024-09-28 14:32:01, --PPPPPPPPTTTTTT-- (44%)
#include <bits/stdc++.h>
using namespace std;
;
int main()
{
int n, x = 1;
cin >> n;
int d = 2;
if (d < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if (n % d == 0)
{
n /= d;
if (x != 1)
cout << " ";
cout << d;
x++;
}
else
d++;
if (d * d > n)
{
if (x != 1)
cout << " ";
cout << n;
break;
}
}
}
return 0;
}
/*
1000000000
*/ | # 2018104, 2024-09-28 14:33:47, -PPPPPPPPPTTTTTT-- (50%)
#include <bits/stdc++.h>
using namespace std;
;
int main()
{
int n, x = 1;
cin >> n;
int d = 2;
if (d < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if (d * d > n)
{
if (x != 1)
cout << " ";
cout << n;
break;
}
if (n % d == 0)
{
n /= d;
if (x != 1)
cout << " ";
cout << d;
x++;
}
else
d++;
}
}
return 0;
}
/*
1000000000
*/ | # 2018618, 2024-09-28 15:12:37, -PPPPPPPPPPPPPPP-- (83%)
#include <bits/stdc++.h>
using namespace std;
;
int main()
{
long long n, x = 1;
cin >> n;
long long d = 2;
if (d < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if (d * d > n)
{
if (x != 1)
cout << " ";
cout << n;
break;
}
if (n % d == 0)
{
n /= d;
if (x != 1)
cout << " ";
cout << d;
x++;
}
else
d++;
}
}
return 0;
}
/*
1000000000
*/ | # 2018646, 2024-09-28 15:13:53, -PPPPPPPPPPPPPPP-- (83%)
#include <bits/stdc++.h>
using namespace std;
;
int main()
{
long long n, x = 1;
cin >> n;
long long d = 2;
if (d < 2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while (n > 1)
{
if (d * d > n)
{
if (x != 1)
cout << " ";
cout << n;
break;
}
if (n % d == 0)
{
n /= d;
if (x != 1)
cout << " ";
cout << d;
x++;
}
else
d++;
}
}
return 0;
}
/*
1000000000
*/ | # 2018668, 2024-09-28 15:14:54, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
;
int main()
{
long long n, x = 1;
cin >> n;
long long d = 2;
if (n< 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if (d * d > n)
{
if (x != 1)
cout << " ";
cout << n;
break;
}
if (n % d == 0)
{
n /= d;
if (x != 1)
cout << " ";
cout << d;
x++;
}
else
d++;
}
}
return 0;
}
/*
1000000000
*/ |
# 2015301, 2024-09-28 09:52:54, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
long long = 2;
if (n>=2){
while(n>1){
while(d*d > n){
cout<<n<<" ";
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d += 1;
}
} else cout<<"No prime factors for numbers less than 2.";
} | # 2015306, 2024-09-28 09:53:20, PTPTTPTPTPxxPxxxPP (44%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
long long d = 2;
if (n>=2){
while(n>1){
while(d*d > n){
cout<<n<<" ";
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d += 1;
}
} else cout<<"No prime factors for numbers less than 2.";
} | # 2015370, 2024-09-28 09:59:24, P-P--P-P-PxxP---PP (44%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
long long d = 2;
if (n>=2){
while(n>1){
if (d*d > n){
cout<<n<<" ";
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d += 1;
}
} else cout<<"No prime factors for numbers less than 2.";
} | # 2015751, 2024-09-28 10:38:39, P-P--P-P-PxxP---PP (44%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
long long d = 2;
if (!(n<2)){
while(n>1){
if (d*d > n){
cout<<n<<" ";
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d += 1;
}
} else cout<<"No prime factors for numbers less than 2.";
} | # 2015992, 2024-09-28 11:01:55, P-P--P-P-PxxP---PP (44%)
#include<iostream>
using namespace std;
int main(){
long n;
cin>>n;
long d = 2;
if (!(n<2)){
while(n>1){
if (d*d > n){
cout<<n<<" ";
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d += 1;
}
} else cout<<"No prime factors for numbers less than 2.";
} | # 2016038, 2024-09-28 11:07:09, P----------T----PP (16%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
long long d = 2;
if (!(n<2)){
while(n>1){
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d += 1;
}
if (d*d > n){
cout<<n<<" ";
}
} else cout<<"No prime factors for numbers less than 2.";
} | # 2016044, 2024-09-28 11:07:42, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
long long d = 2;
if (!(n<2)){
while(n>1){
if (d*d > n){
cout<<n<<" ";
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d += 1;
}
} else cout<<"No prime factors for numbers less than 2.";
} |
# 2017039, 2024-09-28 12:49:04, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n , d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1)
{
if ((d * d) > n)
{
cout << n;
break;
}
else if (n % d == 0)
{
n /= d;
cout << d << " ";
}
else
{
d++;
}
}
return 0;
} | # 2017045, 2024-09-28 12:49:22, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n , d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1)
{
if ((d * d) > n)
{
cout << n;
break;
}
else if (n % d == 0)
{
n /= d;
cout << d << " ";
}
else
{
d++;
}
}
return 0;
} | # 2017052, 2024-09-28 12:50:17, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n , d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1)
{
if ((d * d) > n)
{
cout << n;
break;
}
if (n % d == 0)
{
n /= d;
cout << d << " ";
}
else
{
d++;
}
}
return 0;
} | # 2017068, 2024-09-28 12:51:27, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n , d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1)
{
if ((d * d) > n)
{
cout << n;
break;
}
if (n % d == 0)
{
n /= d;
cout << d << " ";
}
else
{
d++;
}
}
return 0;
} | # 2017541, 2024-09-28 13:39:42, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n , d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1)
{
if ((d * d) > n)
{
cout << n;
break;
}
if (n % d == 0)
{
n /= d;
cout << d << " ";
}
else
{
d++;
if(d%2 == 0)
{
d++;
}
}
}
return 0;
} | # 2017579, 2024-09-28 13:44:29, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n , d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1)
{
if ((d * d) > n)
{
cout << n;
break;
}
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d++;
}
return 0;
} | # 2017818, 2024-09-28 14:08:36, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n , d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1)
{
if ((d * d) > n)
{
cout << n;
break;
}
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d++;
}
return 0;
} |
# 2016973, 2024-09-28 12:41:32, PP-P--P---TTTTTTPP (33%)
#include<iostream>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}else if(N > 1) {
while(N > 1) {
if(d*d > N) {
cout << N;
exit(0);
}else if(N%d == 0) {
N /= d;
}else {
d += 1;
}
}
}
} | # 2016985, 2024-09-28 12:43:25, PP-P--P---TTTTTTPP (33%)
#include<iostream>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}else if(N > 1) {
while(N > 1) {
if(d*d > N) {
cout << N;
break;
}else if(N%d == 0) {
N /= d;
}else {
d += 1;
}
}
}
} | # 2016999, 2024-09-28 12:45:45, PP-P--P---TTTTTTPP (33%)
#include<iostream>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}else if(N > 1) {
while(N > 1) {
if(d*d > N) {
cout << N;
break;
exit(0);
}else if(N%d == 0) {
N /= d;
cout << d;
}else {
d += 1;
}
}
}else {
exit(0);
}
} | # 2017008, 2024-09-28 12:46:23, PP-P--P---TTTTTTPP (33%)
#include<iostream>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}else if(N > 1) {
while(N > 1) {
if(d*d > N) {
cout << N;
N = 100;
break;
exit(0);
}else if(N%d == 0) {
N /= d;
cout << d;
}else {
d += 1;
}
}
}else {
exit(0);
}
} | # 2017049, 2024-09-28 12:49:55, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}else if(N > 1) {
while(N > 1) {
if(d*d > N) {
cout << N;
N = 100;
break;
exit(0);
}else if(N%d == 0) {
N /= d;
cout << d << " ";
}else {
d += 1;
}
}
}else {
exit(0);
}
} | # 2017074, 2024-09-28 12:52:20, Compilation error (0%)
#include<iostream>
using namespace std;
int main() {
double N,d=2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}else if(N > 1) {
while(N > 1) {
if(d*d > N) {
cout << N;
N = 100;
break;
exit(0);
}else if(N%d == 0) {
N /= d;
cout << d << " ";
}else {
d += 1;
}
}
}else {
exit(0);
}
} | # 2017081, 2024-09-28 12:53:13, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main() {
long N,d=2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}else if(N > 1) {
while(N > 1) {
if(d*d > N) {
cout << N;
N = 100;
break;
exit(0);
}else if(N%d == 0) {
N /= d;
cout << d << " ";
}else {
d += 1;
}
}
}else {
exit(0);
}
} |
# 2014960, 2024-09-28 09:20:18, -PP-------TTTTTT-- (11%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d =2;
if(n<2){
cout << "No prome factors fpr numbers less than 2." << endl;
}else {
while(true){
if(n>1){
if(d*d>n){
cout << d << ' '; //cheak
break;
}else if(n % d ==0){
n /= d;
cout << n << ' '; //cheak
}else{
d +=1;
}
}
}
}
} | # 2015568, 2024-09-28 10:18:37, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d =2;
if(n<2){
cout << "No prome factors fpr numbers less than 2." << endl;
}else {
while(true){
if(n>1){
if(d*d>n){
cout << n << ' '; //cheak
break;
}else if(n % d ==0){
n /= d;
cout << d << ' '; //cheak
}else{
d +=1;
}
}
}
}
} | # 2015583, 2024-09-28 10:20:06, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d =2;
if(n<2){
cout << "No prome factors fpr numbers less than 2." << endl;
}else {
while(n>1){
if(d*d>n){
cout << n << ' '; //cheak
break;
}else if(n % d ==0){
n /= d;
cout << d << ' '; //cheak
}else{
d +=1;
}
}
}
} | # 2015625, 2024-09-28 10:25:50, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long long d =2;
if(n<2){
cout << "No prome factors fpr numbers less than 2." << endl;
}else {
while(n>1){
if(d*d>n){
cout << n << ' '; //cheak
break;
}else if(n % d ==0){
n /= d;
cout << d << ' '; //cheak
}else{
d +=1;
}
}
}
} | # 2015665, 2024-09-28 10:29:55, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long long d =2;
if(n<2){
cout << "No prome factors fpr numbers less than 2." << endl;
}else {
while(n>1){
if(d*d>n){
cout << n << ' '; //cheak
break;
}else {
while(n%d == 0){
n /= d;
cout << d << ' ';
}
d+=1;
}
}
}
} | # 2015687, 2024-09-28 10:32:21, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long long d =2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}else {
while(n>1){
if(d*d>n){
cout << n << ' '; //cheak
break;
}else {
while(n%d == 0){
n /= d;
cout << d << ' ';
}
d+=1;
}
}
}
} | # 2015689, 2024-09-28 10:32:24, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long long d =2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}else {
while(n>1){
if(d*d>n){
cout << n << ' '; //cheak
break;
}else {
while(n%d == 0){
n /= d;
cout << d << ' ';
}
d+=1;
}
}
}
} |
# 2017811, 2024-09-28 14:08:07, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main(){
int n,d;
cin >> n;
d = 2;
if(n>=2){
while(n>1){
if(d*d>n){
// cout prime n
cout << n << " ";
break;
}else{
while(n%d==0){
cout << d << " ";
n/=d;
// cout prime d;
}
d+=1;
}
}
}else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017845, 2024-09-28 14:10:47, PPPPPPPPPP-------- (55%)
#include <iostream>
using namespace std;
int main(){
unsigned short int n,d;
cin >> n;
d = 2;
if(n>=2){
while(n>1){
if(d*d>n){
// cout prime n
cout << n << " ";
break;
}else{
while(n%d==0){
cout << d << " ";
n/=d;
// cout prime d;
}
d+=1;
}
}
}else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017857, 2024-09-28 14:11:23, PPPPPPPPPP------PP (66%)
#include <iostream>
using namespace std;
int main(){
short int n;
int d;
cin >> n;
d = 2;
if(n>=2){
while(n>1){
if(d*d>n){
// cout prime n
cout << n << " ";
break;
}else{
while(n%d==0){
cout << d << " ";
n/=d;
// cout prime d;
}
d+=1;
}
}
}else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017910, 2024-09-28 14:14:51, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long int n;
int d;
cin >> n;
d = 2;
if(n>=2){
while(n>1){
if(d*d>n){
// cout prime n
cout << n << " ";
break;
}else{
while(n%d==0){
// cout << d << " ";
n/=d;
cout << d << " ";
}
d+=1;
}
}
}else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017914, 2024-09-28 14:15:43, PPPPPPPPPP-PP-PP-- (77%)
#include <iostream>
using namespace std;
int main(){
unsigned long long int n;
int d;
cin >> n;
d = 2;
if(n>=2){
while(n>1){
if(d*d>n){
// cout prime n
cout << n << " ";
break;
}else{
while(n%d==0){
// cout << d << " ";
n/=d;
cout << d << " ";
}
d+=1;
}
}
}else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017918, 2024-09-28 14:16:11, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long int n;
long long int d;
cin >> n;
d = 2;
if(n>=2){
while(n>1){
if(d*d>n){
// cout prime n
cout << n << " ";
break;
}else{
while(n%d==0){
// cout << d << " ";
n/=d;
cout << d << " ";
}
d+=1;
}
}
}else{
cout << "No prime factors for numbers less than 2.";
}
} |
# 2015001, 2024-09-28 09:25:22, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less";
}
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
break;
}
else if (n % d == 0) {
n /= d;
cout << d << ' ';
}
else {
d += 1;
}
}
} | # 2015007, 2024-09-28 09:26:31, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2";
}
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
break;
}
else if (n % d == 0) {
n /= d;
cout << d << ' ';
}
else {
d += 1;
}
}
} | # 2015016, 2024-09-28 09:27:26, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2.";
}
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
break;
}
else if (n % d == 0) {
n /= d;
cout << d << ' ';
}
else {
d += 1;
}
}
} | # 2015022, 2024-09-28 09:28:59, Compilation error (0%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2.";
break;
}
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
break;
}
else if (n % d == 0) {
n /= d;
cout << d << ' ';
}
else {
d += 1;
}
}
} | # 2015025, 2024-09-28 09:29:23, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
break;
}
else if (n % d == 0) {
n /= d;
cout << d << ' ';
}
else {
d += 1;
}
}
} | # 2015093, 2024-09-28 09:34:20, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
break;
}
else if (n % d == 0) {
n /= d;
cout << d << ' ';
}
else {
d += 1;
}
}
} |
# 2014834, 2024-09-28 09:09:16, PPP--P-P-P--P---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long N;
cin>>N;
long long d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
cout<<d<<" ";
break;
}
else{
if(N%d==0){
N/=d;
cout<<d<<" ";
continue;
}
else{
d+=1;
continue;
}
}
}
}
} | # 2014871, 2024-09-28 09:11:41, PPP--P-P-P--P---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long N;
cin>>N;
long long d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
cout<<d<<" ";
break;
}
else{
if(N%d==0){
N/=d;
cout<<d<<" ";
continue;
}
else{
d+=1;
continue;
}
}
}
}
} | # 2014888, 2024-09-28 09:12:52, PPP--P-P-P--P---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long N;
cin>>N;
long long d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
cout<<d<<" ";
break;
}
else{
if(N%d==0){
N/=d;
cout<<d<<" ";
//continue;
}
else{
d+=1;
//continue;
}
}
}
}
} | # 2014901, 2024-09-28 09:13:40, PPP--P-P-P--P---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long N;
cin>>N;
long long d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
cout<<d;
break;
}
else{
if(N%d==0){
N/=d;
cout<<d<<" ";
//continue;
}
else{
d+=1;
//continue;
}
}
}
}
} | # 2014945, 2024-09-28 09:18:26, PPP--P-P-P--P---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long N;
cin>>N;
long long d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
cout<<d;
break;
}
else{
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d++;
continue;
}
}
}
} | # 2014965, 2024-09-28 09:20:59, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long N;
cin>>N;
long long d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
cout<<N;
break;
}
else{
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
} |
# 2017645, 2024-09-28 13:53:33, -T-TT-T-T-TTTTTT-- (0%)
#include<iostream>
#include<cmath>
using namespace std;
typedef unsigned long long ll;
int main()
{
long n;
cin>>n;
long d=2;
if(n<2){
cout<<"No prime factors for number less than 2.";
}else{
while(n>1){
if(d*d>n){
for(ll p=2;p<=(ll) sqrt(n);p++){
if(n%p==0){
cout<<p<<" ";
}
}
}else{
while(n%d==0){
if(n%d==0){
n/=d;
for(ll p=2;p<=(ll) sqrt(n);p++){
if(d%p==0){
cout<<p<<" ";
}
}
}
}d+=1;
}
}
}
} | # 2017900, 2024-09-28 14:14:07, -T-TT-T-T-TTTTTT-- (0%)
#include<iostream>
#include<cmath>
using namespace std;
typedef unsigned long long ll;
int main()
{
long n;
cin>>n;
long d=2;
if(n<2){
cout<<"No prime factors for number less than 2.";
}else{
while(n>1){
if(d*d>n){
for(ll p=2;p<=(ll) sqrt(n);p++){
if(n%p==0){
cout<<p<<" ";
}
}
}else{
while(n%d==0){
if(n%d==0){
n/=d;
for(ll p=2;p<=(ll) sqrt(n);p++){
if(d%p==0){
cout<<p<<" ";
}
}
}
}d+=1;
}
}
}
} | # 2018161, 2024-09-28 14:39:30, -TPTTPTPTPxTPxxx-- (27%)
#include<iostream>
#include<cmath>
using namespace std;
typedef unsigned long long ll;
int main()
{
long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for number less than 2.";
}else{
while(n>1){
while(d*d>n){
cout<<n<<" ";
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}d+=1;
}
}
} | # 2018189, 2024-09-28 14:42:05, -TPTTPxPTPxxPxxxxx (27%)
#include<iostream>
#include<cmath>
using namespace std;
typedef unsigned long long ll;
int main()
{
ll n;
cin>>n;
ll d=2;
if(n<2){
cout<<"No prime factors for number less than 2.";
}else{
while(n>1){
while(d*d>n){
cout<<n<<" ";
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}d+=1;
}
}
} | # 2018197, 2024-09-28 14:42:36, PTPTTPTPTPxxPxxxxx (33%)
#include<iostream>
#include<cmath>
using namespace std;
typedef unsigned long long ll;
int main()
{
ll n;
cin>>n;
ll d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
while(d*d>n){
cout<<n<<" ";
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}d+=1;
}
}
} | # 2018297, 2024-09-28 14:50:56, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
#include<cmath>
using namespace std;
typedef unsigned long long ll;
int main()
{
long long n;
cin>>n;
long long d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}d+=1;
}
}
} |
# 2014970, 2024-09-28 09:21:43, -TPTTPTPTPxTPxxx-- (27%)
#include<iostream>
using namespace std;
int main(){
long long int N;
int d=2;
cin>>N;
if(N<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(N>1){
if(d*d>N){
cout<<d<<" ";
}
else{
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
} | # 2014975, 2024-09-28 09:22:04, -TPTTPTPTPxTPxxx-- (27%)
#include<iostream>
using namespace std;
int main(){
long long int N;
int d=2;
cin>>N;
if(N<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(N>1){
if(d*d>N){
cout<<d<<" ";
}
else{
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
} | # 2014980, 2024-09-28 09:22:54, -P---------T------ (5%)
#include<iostream>
using namespace std;
int main(){
long long int N;
int d=2;
cin>>N;
if(N<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(N>1){
if(d*d>N){
cout<<d<<" ";
break;
}
else{
while(N%d==0){
N/=d;
cout<<d<<" ";
break;
}
d+=1;
}
}
}
} | # 2014988, 2024-09-28 09:23:30, -PP--P-P-P-TP----- (33%)
#include<iostream>
using namespace std;
int main(){
long long int N;
int d=2;
cin>>N;
if(N<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(N>1){
if(d*d>N){
cout<<d<<" ";
break;
}
else{
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
} | # 2015131, 2024-09-28 09:38:19, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main(){
long long int N =0;
long long int d=2;
cin>>N;
if(N<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(N>1){
if(d*d>N){
cout<<N<<" ";
break;
}
else{
while(N%d==0){
N=N/d;
cout<<d<<" ";
}
if(N%d!=0){
d+=1;
}
}
}
}
} | # 2015154, 2024-09-28 09:40:52, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long int N =0;
long long int d=2;
cin>>N;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
cout<<N<<" ";
break;
}
else{
while(N%d==0){
N=N/d;
cout<<d<<" ";
}
if(N%d!=0){
d+=1;
}
}
}
}
} |
# 2014839, 2024-09-28 09:09:35, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int n;cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
break;
}
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d++;
}
} | # 2014859, 2024-09-28 09:11:08, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int n;cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
break;
}
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d++;
}
} | # 2014891, 2024-09-28 09:13:03, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int n;cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
break;
}
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d++;
}
return 0;
} | # 2015068, 2024-09-28 09:33:18, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int n;cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
break;
}
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d++;
}
return 0;
} | # 2015488, 2024-09-28 10:11:27, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long long n;cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
break;
}
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d++;
}
return 0;
} | # 2015492, 2024-09-28 10:11:53, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long n;cin>>n;
long long d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
break;
}
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d++;
}
return 0;
} |
# 2014845, 2024-09-28 09:10:05, P-P--P-P-P-TP---PP (44%)
#include <iostream>
using namespace std;
int main() {
long long n;
int d=2;
cin >> n;
if (n<2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (n>1) {
if (d*d>n) {break; cout << n << " ";}
while (n%d==0) {
n /= d;
cout << d << " ";
}
d++;
}
}
} | # 2014916, 2024-09-28 09:14:58, P-P--P-P-P--P---PP (44%)
#include <iostream>
using namespace std;
int main() {
long long n;
long long d=2;
cin >> n;
if (n<2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (n>1) {
if (d*d>n) {break; cout << n << " ";}
while (n%d==0) {
n /= d;
cout << d << " ";
}
d++;
}
}
} | # 2016135, 2024-09-28 11:16:24, P-P--P-P-P--P----- (33%)
#include <iostream>
using namespace std;
int main() {
unsigned long long n;
unsigned long long d=2;
cin >> n;
if (n<2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (n>1) {
if (d*d>n) {break; cout << n << " ";}
while (n%d==0) {
n /= d;
cout << d << " ";
}
d++;
}
}
} | # 2016181, 2024-09-28 11:21:40, PPPPPPPPPPPPPPPP-- (88%)
#include <iostream>
using namespace std;
int main() {
unsigned long long n;
unsigned long long d=2;
cin >> n;
if (n>1) {
while (n>1) {
if (d*d>n) {cout << n;break;}
while (n%d==0) {
n/=d;
cout << d << " ";
}
d+=1;
}
}
else cout << "No prime factors for numbers less than 2.";
} | # 2016201, 2024-09-28 11:23:12, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
long long n;
long long d=2;
cin >> n;
if (n>1) {
while (n>1) {
if (d*d>n) {cout << n;break;}
while (n%d==0) {
n/=d;
cout << d << " ";
}
d+=1;
}
}
else cout << "No prime factors for numbers less than 2.";
} | # 2016367, 2024-09-28 11:37:05, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
long long n;
long long d=2;
cin >> n;
if (n<2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (n>1) {
if (d*d>n) {cout << n << " ";break;}
while (n%d==0) {
n /= d;
cout << d << " ";
}
d++;
}
}
} |
# 2016934, 2024-09-28 12:37:49, -PPPPPPPPPPTPPPP-- (77%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n<2){
cout << "No prime factor for number less than 2";
return 0;
}
while(n > 1){
if(d*d > n){
cout << n << ' ';
break;
}else{
if(n%d == 0){
n/=d;
cout << d << ' ';
}else{
d+=1;
}
}
}
return 0;
} | # 2017006, 2024-09-28 12:46:13, ------------------ (0%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
cout << n << '\n';
long long d = 2;
if(n<2){
cout << "No prime factors for number less than 2";
return 0;
}
while(n > 1){
if(d*d > n){
cout << n << ' ';
break;
}else if(n%d == 0){
while(n%d == 0){
n/=d;
cout << d << ' ';
}
}else{
d+=1;
}
}
return 0;
} | # 2017010, 2024-09-28 12:46:29, -PPPPPPPPPPPPPPP-- (83%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
//cout << n << '\n';
long long d = 2;
if(n<2){
cout << "No prime factors for number less than 2";
return 0;
}
while(n > 1){
if(d*d > n){
cout << n << ' ';
break;
}else if(n%d == 0){
while(n%d == 0){
n/=d;
cout << d << ' ';
}
}else{
d+=1;
}
}
return 0;
} | # 2017013, 2024-09-28 12:46:46, -PPPPPPPPPPPPPPP-- (83%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
//cout << n << '\n';
long long d = 2;
if(n<2){
cout << "No prime factors for number less than 2.";
return 0;
}
while(n > 1){
if(d*d > n){
cout << n << ' ';
break;
}else if(n%d == 0){
while(n%d == 0){
n/=d;
cout << d << ' ';
}
}else{
d+=1;
}
}
return 0;
} | # 2017017, 2024-09-28 12:47:05, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
//cout << n << '\n';
long long d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n > 1){
if(d*d > n){
cout << n << ' ';
break;
}else if(n%d == 0){
while(n%d == 0){
n/=d;
cout << d << ' ';
}
}else{
d+=1;
}
}
return 0;
} |
# 2014986, 2024-09-28 09:23:13, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std;
int main(){
int x;
cin>>x;
int d=2;
if(x<2){
cout<<"No prime factors for numbers less than 2";
}
while(x>1){
if(d*d>x){
cout<<x<<" ";
break;
}
while(x%d==0){
x/=d;
cout<<d<<" ";
}
d+=1;
}
return 0;
} | # 2015201, 2024-09-28 09:44:07, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main(){
int x;
cin>>x;
int d=2;
if(x<2){
cout<<"No prime factors for numbers less than 2.";
}
while(x>1){
if(d*d>x){
cout<<x<<" ";
break;
}
while(x%d==0){
x/=d;
cout<<d<<" ";
}
d+=1;
}
return 0;
} | # 2015233, 2024-09-28 09:47:35, -PPPPPPPPP-PP-PP-- (72%)
#include <iostream>
using namespace std;
int main(){
unsigned long long int x;
cin>>x;
int d=2;
if(x<2){
cout<<"No prime factors for numbers less than 2";
}
while(x>1){
if(d*d>x){
cout<<x<<" ";
break;
}
while(x%d==0){
x/=d;
cout<<d<<" ";
}
d+=1;
}
return 0;
} | # 2015530, 2024-09-28 10:15:15, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main(){
long int x;
cin>>x;
long int d=2;
if(x<2){
cout<<"No prime factors for numbers less than 2";
}
while(x>1){
if(d*d>x){
cout<<x<<" ";
break;
}
while(x%d==0){
x/=d;
cout<<d<<" ";
}
d+=1;
}
return 0;
} | # 2015536, 2024-09-28 10:15:29, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long int x;
cin>>x;
long int d=2;
if(x<2){
cout<<"No prime factors for numbers less than 2.";
}
while(x>1){
if(d*d>x){
cout<<x<<" ";
break;
}
while(x%d==0){
x/=d;
cout<<d<<" ";
}
d+=1;
}
return 0;
} |
# 2016937, 2024-09-28 12:37:57, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d=2;
if (N<2)
{
cout << "No prime factors for numbers less than 2." << endl;
}else{
while (N>1)
{
if (d*d>N)
{
cout << N ;
break;
}else{
if (N%d==0)
{
N/=d;
cout << d << " ";
}else{
d+=1;
}
}
}
}
} | # 2016940, 2024-09-28 12:38:13, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d=2;
if (N<2)
{
cout << "No prime factors for numbers less than 2." << endl;
}else{
while (N>1)
{
if (d*d>N)
{
cout << N ;
break;
}else{
if (N%d==0)
{
N/=d;
cout << d << " ";
}else{
d+=1;
}
}
}
}
} | # 2016947, 2024-09-28 12:38:46, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d=2;
if (N<2)
{
cout << "No prime factors for numbers less than 2." << endl;
}else{
while (N>1)
{
if (d*d>N)
{
cout << N ;
break;
}else{
if (N%d==0)
{
N/=d;
cout << d << " ";
}else{
d+=1;
}
}
}
}
} | # 2016972, 2024-09-28 12:41:29, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d=2;
if (N<2)
{
cout << "No prime factors for numbers less than 2." << endl;
}else{
while (N>1)
{
if (d*d>N)
{
cout << N ;
break;
}else if (N%d==0)
{
N/=d;
cout << d << " ";
}else d++;
}
}
} | # 2017001, 2024-09-28 12:45:56, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
if (N>1e+19)
{
return 0;
}
long long d=2;
if (N<2)
{
cout << "No prime factors for numbers less than 2." << endl;
}else{
while (N>1)
{
if (d*d>N)
{
cout << N ;
break;
}else if (N%d==0)
{
N/=d;
cout << d << " ";
}else d++;
}
}
} |
# 2017505, 2024-09-28 13:35:45, PP---------T----PP (22%)
#include<bits/stdc++.h>
using namespace std;
void isprime(long long n){
if(n<=1)return;
for(long long i=3;i<sqrt(n);i+=2){
if(n%i==0 && n!=i){
return;
}
}
cout << n << " ";
}
int main(){
long long n;
cin >> n;
long long d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
nigga:
if(n>1){
if(d*d>n){
if(n%2==0)cout << "2 ";
for(long long i=3;i<n;i+=2){
if(n%i==0)isprime(i);
}
}
else{
if(n%d==0){
n/=d;
if(d%2==0)cout << "2 ";
for(long long i=3;i<d;i+=2){
if(n%i==0)isprime(i);
}
}
else{
d++;
goto nigga;
}
}
}
else{
return 0;
}
}
} | # 2017759, 2024-09-28 14:04:27, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
void isprime(long long n){
if(n<=2)return;
for(long long i=3;i<n;i+=2){
if(n%i==0){
return;
}
}
cout << n << " ";
}
int main(){
long long n;
cin >> n;
long long d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
nigga:
if(n>1){
if(d*d>n){
if(n%2==0)cout << "2 ";
for(long long i=3;i<=n;i+=2){
if(n%i==0)isprime(i);
}
}
else{
mido:
if(n%d==0){
n/=d;
if(d%2==0){cout << "2 ";}
for(long long i=3;i<=d;i+=2){
if(d%i==0)isprime(i);
}
goto mido;
}
else{
d++;
goto nigga;
}
}
}
else{
return 0;
}
}
} | # 2017773, 2024-09-28 14:05:09, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
void isprime(long long n){
if(n<=2)return;
for(long long i=3;i<sqrt(n);i+=2){
if(n%i==0){
return;
}
}
cout << n << " ";
}
int main(){
long long n;
cin >> n;
long long d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
nigga:
if(n>1){
if(d*d>n){
if(n%2==0)cout << "2 ";
for(long long i=3;i<=n;i+=2){
if(n%i==0)isprime(i);
}
}
else{
mido:
if(n%d==0){
n/=d;
if(d%2==0){cout << "2 ";}
for(long long i=3;i<=d;i+=2){
if(d%i==0)isprime(i);
}
goto mido;
}
else{
d++;
goto nigga;
}
}
}
else{
return 0;
}
}
} | # 2018485, 2024-09-28 15:04:21, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
void isprime(long long n){
if(n<=2)return;
if((n%3==0 && n!=3) || (n%5==0 && n!=5) || (n%7==0 && n!=7))return;
for(long long i=3;i<sqrt(n);i+=2){
if(n%i==0){
return;
}
}
cout << n << " ";
}
int main(){
long long n;
cin >> n;
long long d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
nigga:
if(n>1){
if(d*d>n){
if(n%2==0)cout << "2 ";
for(long long i=3;i<=n;i+=2){
if(n%i==0)isprime(i);
}
}
else{
mido:
if(n%d==0){
n/=d;
if(d%2==0){cout << "2 ";}
for(long long i=3;i<=d;i+=2){
if(d%i==0)isprime(i);
}
goto mido;
}
else{
d++;
goto nigga;
}
}
}
else{
return 0;
}
}
} | # 2018691, 2024-09-28 15:15:49, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
void isprime(long long n){
if(n<=2)return;
if((n%3==0 && n!=3) || (n%5==0 && n!=5) || (n%7==0 && n!=7))return;
for(long long i=3;i<sqrt(n);i+=2){
if(n%i==0){
return;
}
}
cout << n << " ";
}
bool isprime2(long long n){
if(n<=2)return 0;
if((n%3==0 && n!=3) || (n%5==0 && n!=5) || (n%7==0 && n!=7))return 0;
for(long long i=3;i<sqrt(n);i+=2){
if(n%i==0){
return 0;
}
}
cout << n << " ";
return 1;
}
int main(){
long long n;
cin >> n;
long long d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
nigga:
if(n>1){
if(d*d>n){
bool nig=1;
if(n%2==0)cout << "2 ";
else{
if(isprime2(n)){
nig=0;
}
}
for(long long i=3;i<=n;i+=2){
if(nig==0)break;
if(n%i==0)isprime(i);
}
}
else{
mido:
if(n%d==0){
n/=d;
if(d%2==0){cout << "2 ";}
else{
if(isprime2(d)){
goto popa;
}
}
for(long long i=3;i<=d;i+=2){
if(d%i==0)isprime(i);
}
popa:
goto mido;
}
else{
d++;
goto nigga;
}
}
}
else{
return 0;
}
}
} |
# 2014825, 2024-09-28 09:08:12, PPP--P-P-P--P---PP (50%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N, d = 2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while(true) {
if(N > 1){
if(d*d > N) {
cout << d;
break;
}
else {
if(N % d == 0) {
N /= d;
cout << d << " ";
}
else {
d++;
}
}
}
}
}
return 0;
} | # 2014905, 2024-09-28 09:13:53, PPP--P-P-P--P---PP (50%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N, d = 2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while(true) {
if(N > 1){
if(d*d > N) {
cout << d;
break;
}
else {
if(N % d == 0) {
cout << d << " ";
N = N / d;
}
else {
d = d + 1;
}
}
}
else {
break;
}
}
}
return 0;
} | # 2016107, 2024-09-28 11:13:50, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
int d = 2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while(true) {
if(N > 1){
if(d*d > N) {
cout << N;
break;
}
else {
while(true) {
if(N % d == 0) {
cout << d << " ";
N = N / d;
}
else {
d = d + 1;
break;
}
}
}
}
else {
break;
}
}
}
return 0;
} | # 2016108, 2024-09-28 11:13:54, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
int d = 2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while(true) {
if(N > 1){
if(d*d > N) {
cout << N;
break;
}
else {
while(true) {
if(N % d == 0) {
cout << d << " ";
N = N / d;
}
else {
d = d + 1;
break;
}
}
}
}
else {
break;
}
}
}
return 0;
} | # 2016724, 2024-09-28 11:57:44, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
int d = 2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while(true) {
if(N > 1){
if(d > sqrt(N)) {
cout << N;
break;
}
else {
while(true) {
if(N % d == 0) {
cout << d << " ";
N /= d;
}
else {
d++;
break;
}
}
}
}
else {
break;
}
}
}
return 0;
} |
# 2014846, 2024-09-28 09:10:14, -PPPPPPPPPPTPPPP-- (77%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
for(int i=2;i<=n;)
{
if(n%i==0){
n=n/i;
cout<<i<<" ";
}
else i++;
}
} | # 2014957, 2024-09-28 09:20:07, -PPPPPPPPPPTPPPP-- (77%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
else{for(int i=2;;)
{
if(n>1){
if(i*i>n){
cout<<n;
break;
}
else{ if(n%i==0)
{ n=n/i;
cout<<i<<" ";} else i++;
}
}
}}
} | # 2015081, 2024-09-28 09:33:43, -PPPPPPPPPPTPPPP-- (77%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
else{for(int i=2;;)
{
if(n>1){
if(i*i>n){
cout<<n;
break;
}
else{ if(n%i==0)
{ n=n/i;
cout<<i<<" ";} else i++;
}
}
}}
} | # 2015189, 2024-09-28 09:43:09, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else{for(int i=2;;)
{
if(n>1){
if(i*i>n){
cout<<n;
break;
}
else{ if(n%i==0)
{ n=n/i;
cout<<i<<" ";} else i++;
}
}
}}
} | # 2015854, 2024-09-28 10:50:42, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else{for(long long i=2;;)
{
if(n>1){
if(i*i>n){
cout<<n;
break;
}
else{ if(n%i==0)
{ n=n/i;
cout<<i<<" ";} else i++;
}
}
}}
} |
# 2014944, 2024-09-28 09:18:25, P----------T----PP (16%)
#include <bits/stdc++.h>
using namespace std;
long long printcomponent(long long n){
long long component;
long long i = 2;
while(i < n){
if(n%i != 0){
i++;
}else{
component += i;
}
}
return component;
}
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
} else{
while(n > 1){
if(d*d > n){
cout << printcomponent(n);
break;
}else{
if(n%d == 0){
n /= d;
cout << printcomponent(d);
break; //try shuffle this line and above line later
}else{
d++;
}
}
}
}
} | # 2015327, 2024-09-28 09:55:47, P---------------PP (16%)
#include <bits/stdc++.h>
using namespace std;
void printcomponent(long long n){
string component;
long long i = 2;
while(i < n){
n = n/i;
if(n%i == 0){
component += i;
}else{
i++;
}
}
cout << component;
}
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
} else{
while(n > 1){
if(d*d > n){
printcomponent(n);
//cout << n << " ";
break;
}else{
if(n%d == 0){
n /= d;
printcomponent(d);
cout << d << " ";
break; //try shuffle this line and above line later
}else{
d++;
}
}
}
}
} | # 2015373, 2024-09-28 09:59:29, PP-P--P----P----PP (38%)
#include <bits/stdc++.h>
using namespace std;
void printcomponent(long long n){
string component;
long long i = 2;
while(i < n){
n = n/i;
if(n%i == 0){
component += i;
}else{
i++;
}
}
cout << component;
}
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
} else{
while(n > 1){
if(d*d > n){
cout << n << " ";
//cout << n << " ";
break;
}else{
if(n%d == 0){
n /= d;
printcomponent(d);
//cout << d << " ";
//break; //try shuffle this line and above line later
}else{
d++;
}
}
}
}
} | # 2015379, 2024-09-28 10:00:40, PP-P--P----P----PP (38%)
#include <bits/stdc++.h>
using namespace std;
void printcomponent(long long n){
string component;
long long i = 2;
while(i < n){
n = n/i;
if(n%i == 0){
component += i;
}else{
i++;
}
}
cout << component;
}
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
} else{
while(n > 1){
if(d*d > n){
cout << n << " ";
break;
}else{
if(n%d == 0){
n /= d;
cout << d << " ";
break; //try shuffle this line and above line later
}else{
d++;
}
}
}
}
} | # 2015393, 2024-09-28 10:02:06, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
void printcomponent(long long n){
string component;
long long i = 2;
while(i < n){
n = n/i;
if(n%i == 0){
component += i;
}else{
i++;
}
}
cout << component;
}
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
} else{
while(n > 1){
if(d*d > n){
cout << n << " ";
break;
}else{
while(n%d == 0){
n /= d;
cout << d << " ";
//break; //try shuffle this line and above line later
}
d++;
}
}
}
} |
# 2015111, 2024-09-28 09:36:02, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(){
long int n;
int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
//---------------
else{
while(true){
if(n>1){
if (d*d>n){
cout<<n<<" ";
break;
}
else {
if(n%d==0) {n/=d;
cout<<d<<" ";
}
else {d+=1;
}
}
}
}
}//----------------------
} | # 2015118, 2024-09-28 09:36:36, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(){
int n;
int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
//---------------
else{
while(true){
if(n>1){
if (d*d>n){
cout<<n<<" ";
break;
}
else {
if(n%d==0) {n/=d;
cout<<d<<" ";
}
else {d+=1;
}
}
}
}
}//----------------------
} | # 2015124, 2024-09-28 09:37:18, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(){
long long int n;
int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
//---------------
else{
while(true){
if(n>1){
if (d*d>n){
cout<<n<<" ";
break;
}
else {
if(n%d==0) {n/=d;
cout<<d<<" ";
}
else {d+=1;
}
}
}
}
}//----------------------
} | # 2015152, 2024-09-28 09:40:48, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(){
long long int n;
int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
//---------------
else{
while(true){
if(n>1){
if (d*d>n){
cout<<n<<" ";
break;
}
else {
if(n%d==0) {n/=d;
cout<<d<<" ";
}
else {d+=1;
}
}
}
}
}//----------------------
} | # 2015162, 2024-09-28 09:41:20, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(){
long long int n;
long long int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
//---------------
else{
while(true){
if(n>1){
if (d*d>n){
cout<<n<<" ";
break;
}
else {
if(n%d==0) {n/=d;
cout<<d<<" ";
}
else {d+=1;
}
}
}
}
}//----------------------
} |
# 2014862, 2024-09-28 09:11:11, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
long long int N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while (true)
{
if (N > 1)
{
if (d * d > N)
{
// prime fac of N break
cout << N << " ";
break;
}
else
{
if (N % d == 0)
{
N /= d;
// prime fac of d and loop
cout << d << " ";
}
else
{
d += 1; // loop
}
}
}
else
{
break;
}
}
}
}
// ENG_EXAM_WEEK | # 2014867, 2024-09-28 09:11:24, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
long long int N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while (true)
{
if (N > 1)
{
if (d * d > N)
{
// prime fac of N break
cout << N << " ";
break;
}
else
{
if (N % d == 0)
{
N /= d;
// prime fac of d and loop
cout << d << " ";
}
else
{
d += 1; // loop
}
}
}
else
{
break;
}
}
}
}
// ENG_EXAM_WEEK | # 2014909, 2024-09-28 09:14:13, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
long long int N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while (true)
{
if (N > 1)
{
if (d * d > N)
{
// prime fac of N break
cout << N << " ";
break;
}
else
{
if (N % d == 0)
{
N /= d;
// prime fac of d and loop
cout << d << " ";
}
else
{
d += 1; // loop
}
}
}
else
{
break;
}
}
}
}
// ENG_EXAM_WEEK | # 2014921, 2024-09-28 09:15:35, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
long long int N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d * d > N)
{
// prime fac of N break
cout << N << " ";
break;
}
else
{
if (N % d == 0)
{
N /= d;
// prime fac of d and loop
cout << d << " ";
}
else
{
d += 1; // loop
}
}
}
else
{
break;
}
}
}
}
// ENG_EXAM_WEEK | # 2014958, 2024-09-28 09:20:12, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
long long int N;
cin >> N;
long long int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d * d > N)
{
// prime fac of N break
cout << N << " ";
break;
}
else
{
if (N % d == 0)
{
N /= d;
// prime fac of d and loop
cout << d << " ";
}
else
{
d += 1; // loop
}
}
}
else
{
break;
}
}
}
}
// ENG_EXAM_WEEK |
# 2014837, 2024-09-28 09:09:19, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std ;
int main() {
int n ; cin >> n ;
int d = 2 ;
if(n < 2) {
cout << "No prime factors for number less than 2" ;
return 0 ;
}
while(n > 1) {
if(d * d > n) {
cout << n ;
return 0 ;
}
while(n % d == 0) {
n = n / d ;
cout << d << " " ;
}
d += 1 ;
}
return 0 ;
} | # 2014847, 2024-09-28 09:10:18, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std ;
int main() {
long long int n ; cin >> n ;
long long int d = 2 ;
if(n < 2) {
cout << "No prime factors for number less than 2" ;
return 0 ;
}
while(n > 1) {
if(d * d > n) {
cout << n ;
return 0 ;
}
while(n % d == 0) {
n = n / d ;
cout << d << " " ;
}
d += 1 ;
}
return 0 ;
} | # 2015138, 2024-09-28 09:39:41, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std ;
int main() {
long long int n ; cin >> n ;
long long int d = 2 ;
if(n < 2) {
cout << "No prime factors for number less than 2" ;
return 0 ;
}
while(n > 1) {
if(d * d > n) {
cout << n ;
return 0 ;
}
while(n % d == 0) {
n = n / d ;
cout << d << " " ;
}
d += 1 ;
}
return 0 ;
} | # 2015178, 2024-09-28 09:42:19, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std ;
int main() {
long long int n ; cin >> n ;
long long int d = 2 ;
if(n < 2) {
cout << "No prime factors for number less than 2." ;
return 0 ;
}
while(n > 1) {
if(d * d > n) {
cout << n ;
return 0 ;
}
while(n % d == 0) {
n = n / d ;
cout << d << " " ;
}
d += 1 ;
}
return 0 ;
} | # 2015184, 2024-09-28 09:42:48, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std ;
int main() {
long long int n ; cin >> n ;
long long int d = 2 ;
if(n < 2) {
cout << "No prime factors for numbers less than 2." ;
return 0 ;
}
while(n > 1) {
if(d * d > n) {
cout << n ;
return 0 ;
}
while(n % d == 0) {
n = n / d ;
cout << d << " " ;
}
d += 1 ;
}
return 0 ;
} |
# 2016825, 2024-09-28 12:27:36, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
return 0;
}
int d=2;
while(n>1){
if(n%d==0){
cout<<d<<" ";
n = n/d;
}
else{
d++;
}
}
} | # 2016836, 2024-09-28 12:29:03, PPP--P-P-P-TP---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
return 0;
}
int d=2;
while(n>1){
if(d*d>n){
cout<<d;
return 0;
}
if(n%d==0){
cout<<d<<" ";
n = n/d;
}
else{
d++;
}
}
} | # 2016855, 2024-09-28 12:30:57, PPP--P-P-P-TP---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
return 0;
}
int d=2;
while(n>1){
if(d*d>n){
cout<<d;
n = n/d;
continue;
}
if(n%d==0){
cout<<d<<" ";
n = n/d;
}
else{
d++;
}
}
} | # 2016886, 2024-09-28 12:34:12, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
return 0;
}
int d=2;
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}
while(n%d==0){
cout<<d<<" ";
n = n/d;
}
d++;
}
} | # 2018169, 2024-09-28 14:40:17, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
return 0;
}
long long d=2;
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}
while(n%d==0){
cout<<d<<" ";
n = n/d;
}
d++;
}
} |
# 2017609, 2024-09-28 13:49:40, PP---------T----PP (22%)
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
int main(){
long long N;
cin>>N;
int d=2;
if(N<2){
cout <<"No prime factors for numbers less than 2." ;
}else if(N > 1){
if(d *d > N){
cout <<N;
}else{
if(d*d <= N){
while(d*d <= N){
if(N % d == 0){
N = N/d;
cout<<d<<" ";
if(N == 1){
cout<<d;
}
}else{
d++;
}
}
}
}
}
} | # 2017637, 2024-09-28 13:52:55, PPP--P-P-P-TP---PP (50%)
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
int main(){
long long N;
cin>>N;
int d=2;
if(N<2){
cout <<"No prime factors for numbers less than 2." ;
}else if(N > 1){
if(d *d > N){
cout <<N;
}else{
if(d*d <= N){
while(d*d <= N){
if(N % d == 0){
N = N/d;
cout<<d<<" ";
}else{
d++;
}
}
cout<< d;
}
}
}
} | # 2018094, 2024-09-28 14:32:48, PPP--P-P-P--P---PP (50%)
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
int main(){
long long N;
cin>>N;
long long d=2;
if(N<2){
cout <<"No prime factors for numbers less than 2." ;
}else if(N > 1){
if(d *d > N){
cout <<N;
}else{
if(d*d <= N){
while(d*d <= N){
if(N % d == 0){
N = N/d;
cout<<d<<" ";
}else{
d++;
}
}
cout<< d;
}
}
}
} | # 2018481, 2024-09-28 15:03:44, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
int main(){
long long N;
cin>>N;
long long d=2;
if(N<2){
cout <<"No prime factors for numbers less than 2." ;
}else if(N > 1){
if(d *d > N){
cout <<N;
}else{
if(d*d <= N){
while(d*d <= N){
if(N % d == 0){
N = N/d;
cout<<d<<" ";
}else{
d++;
}
}
if(N % d ==0){
cout<< d;
}else{
cout <<N;
}
}
}
}
} |
# 2016987, 2024-09-28 12:43:37, P-P--P-P-P-TP---PP (44%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n; cin >> n;
if(n < 2) cout << "No prime factors for numbers less than 2.";
else{
int d = 2;
while(n > 1){
if(d*d > n) break;
while(n%d == 0){
n /= d;
cout << d << " ";
}
d++;
}
}
return 0;
} | # 2017704, 2024-09-28 13:59:41, P-P--P-P-P--P---PP (44%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n; cin >> n;
if(n < 2) cout << "No prime factors for numbers less than 2.";
else{
long long int d = 2;
while(n > 1){
if(d*d > n) break;
while(n%d == 0){
n /= d;
cout << d << " ";
}
d++;
}
}
return 0;
} | # 2017732, 2024-09-28 14:02:23, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n; cin >> n;
if(n < 2) cout << "No prime factors for numbers less than 2.";
else{
long long int d = 2;
while(n > 1){
// if(d*d > n) break;
while(n%d == 0){
n /= d;
cout << d << " ";
}
d++;
}
}
return 0;
} | # 2017781, 2024-09-28 14:05:29, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n; cin >> n;
if(n < 2) cout << "No prime factors for numbers less than 2.";
else{
long long int d = 2;
while(n > 1){
if(d*d > n){
cout << n << " ";
break;
}
while(n%d == 0){
n /= d;
cout << d << " ";
}
d++;
}
}
return 0;
} |
# 2016879, 2024-09-28 12:33:48, -----------T------ (0%)
#include <iostream>
using namespace std;
bool prime(long long int n){
for(long long int i = 2 ; i*i < n ; i++){
if(n % i == 0)
return false;
}
return true;
}
int main(){
long long int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2";
}
else{
while(n > 1){
if(d * d > n){
for(int i = 2 ; i < n ; i++){
if(n % i == 0){
if(prime(i))
cout << i << " ";
}
}
return 0;
}
else{
while(n % d == 0){
n = n / d;
for(int i = 2 ; i < d ; i++){
if(d % i == 0){
if(prime(d))
cout << i << " ";
}
}
}
d = d + 1;
}
}
}
return 0;
} | # 2016946, 2024-09-28 12:38:39, --P--P-P-P-TP----- (27%)
#include <iostream>
using namespace std;
bool prime(long long int n){
for(long long int i = 2 ; i*i < n ; i++){
if(n % i == 0)
return false;
}
return true;
}
int main(){
long long int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2";
}
else{
while(n > 1){
if(d * d > n){
for(int i = 2 ; i < n ; i++){
if(n % i == 0){
if(prime(i))
cout << i << " ";
}
}
return 0;
}
else{
while(n % d == 0){
n = n / d;
cout << d << " ";
}
d = d + 1;
}
}
}
return 0;
} | # 2016963, 2024-09-28 12:40:34, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
bool prime(long long int n){
for(long long int i = 2 ; i*i < n ; i++){
if(n % i == 0)
return false;
}
return true;
}
int main(){
long long int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2";
}
else{
while(n > 1){
if(d * d > n){
cout << n << " ";
break;
}
else{
while(n % d == 0){
n = n / d;
cout << d << " ";
}
d = d + 1;
}
}
}
return 0;
} | # 2016971, 2024-09-28 12:41:21, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin >> n;
long long int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d * d > n){
cout << n << " ";
break;
}
else{
while(n % d == 0){
n = n / d;
cout << d << " ";
}
d = d + 1;
}
}
}
return 0;
} |
# 2014850, 2024-09-28 09:10:28, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factor for number less than 2";
}
else{
while(N>1){
if(d*d > N){
cout << N;
break;
}
else{
while(N % d == 0){
N /= d;
cout << d<<" ";
}
d+=1;
}
}
}
} | # 2014872, 2024-09-28 09:11:48, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d=2;
if(N < 2){
cout << "No prime factor for number less than 2";
}
else{
while(N>1){
if(d*d > N){
cout << N;
break;
}
else{
while(N % d == 0){
N /= d;
cout << d<<" ";
}
d+=1;
}
}
}
} | # 2014886, 2024-09-28 09:12:42, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2";
}
else{
while(N>1){
if(d*d > N){
cout << N;
break;
}
else{
while(N % d == 0){
N /= d;
cout << d<<" ";
}
d+=1;
}
}
}
} | # 2014893, 2024-09-28 09:13:14, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d > N){
cout << N;
break;
}
else{
while(N % d == 0){
N /= d;
cout << d<<" ";
}
d+=1;
}
}
}
} |
# 2014854, 2024-09-28 09:10:42, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main(){
long long n,d=2;
cin>>n;
if(n<d){
cout<<"No prime factors for numbers less than 2";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
} | # 2014904, 2024-09-28 09:13:50, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main(){
long long n,d=2;
cin>>n;
if(n<d){
cout<<"No prime factors for numbers less than 2";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
return 0;
} | # 2015086, 2024-09-28 09:33:51, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main(){
long long n,d=2;
cin>>n;
if(n<d){
cout<<"No prime factors for numbers less than 2";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
return 0;
} | # 2015255, 2024-09-28 09:49:33, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long n,d=2;
cin>>n;
if(n<d){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
return 0;
} |
# 2014934, 2024-09-28 09:17:10, -P-P--P----P------ (22%)
#include <iostream>
long long int N;
long long int d = 2;
int main()
{
std::cin >> N;
std::cout << N << '\n';
if ( N < 2 )
{
std::cout << "No prime factors for numbers less than 2";
return 0;
}
else
{
while (d*d <= N)
{
if (N%d == 0)
{
std::cout << d << " ";
N = N/d;
}
else
{
d++;
}
}
}
} | # 2015772, 2024-09-28 10:41:33, ------------------ (0%)
#include <iostream>
long long int N;
long long int d = 2;
int main()
{
std::cin >> N;
if ( N < 2 )
{
std::cout << "No prime factors for numbers less than 2";
return 0;
}
else
{
while (d*d <= N)
{
if (N%d == 0)
{
std::cout << d << " ";
N = N/d;
}
else
{
d++;
}
}
}
} | # 2015855, 2024-09-28 10:50:50, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
long long int N;
long long int d = 2;
int main()
{
std::cin >> N;
if ( N < 2 )
{
std::cout << "No prime factors for numbers less than 2";
return 0;
}
else
{
while (N > 1)
{
if (d*d > N)
{
std::cout << N << " ";
return 0;
}
else
{
if ( N%d == 0)
{
N = N/d;
std::cout << d << " ";
}
else
{
d += 1;
}
}
}
}
} | # 2015860, 2024-09-28 10:51:22, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
long long int N;
long long int d = 2;
int main()
{
std::cin >> N;
if ( N < 2 )
{
std::cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
while (N > 1)
{
if (d*d > N)
{
std::cout << N << " ";
return 0;
}
else
{
if ( N%d == 0)
{
N = N/d;
std::cout << d << " ";
}
else
{
d += 1;
}
}
}
}
} |
# 2014828, 2024-09-28 09:08:27, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main(){
long N;
cin>>N;
int d=2;
if(N<2){
cout<<"No prime factors for numbers less";
}else{
while(0==0){
if(N>1){
if(d*d>N){
cout<<N;
break;
}else if(N%d==0){
N/=d;
cout<<d<<" ";
}else{
d+=1;
}
}else{
break;
}
}
}
} | # 2014841, 2024-09-28 09:09:47, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main(){
int N;
cin>>N;
int d=2;
if(N<2){
cout<<"No prime factors for numbers less";
}else{
while(0==0){
if(N>1){
if(d*d>N){
cout<<N;
break;
}else if(N%d==0){
N/=d;
cout<<d<<" ";
}else{
d+=1;
}
}else{
break;
}
}
}
} | # 2014844, 2024-09-28 09:10:04, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main(){
long N;
cin>>N;
long d=2;
if(N<2){
cout<<"No prime factors for numbers less";
}else{
while(0==0){
if(N>1){
if(d*d>N){
cout<<N;
break;
}else if(N%d==0){
N/=d;
cout<<d<<" ";
}else{
d+=1;
}
}else{
break;
}
}
}
} | # 2015180, 2024-09-28 09:42:24, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long N;
cin>>N;
long d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(0==0){
if(N>1){
if(d*d>N){
cout<<N;
break;
}else if(N%d==0){
N/=d;
cout<<d<<" ";
}else{
d+=1;
}
}else{
break;
}
}
}
} |
# 2016847, 2024-09-28 12:30:13, --P--P-P-P--P----- (27%)
#include <bits/stdc++.h>
using namespace std;
main(){
long n,d=2;
scanf("%ld",&n);
if(n<=2) printf("No prime number factors for numbers less than 2");
else {
while(n>1){
if(d*d>n){
printf("%ld ",d);
break;
}
else if(n%d==0){
n/=d;
printf("%ld ",d);
}
else d++;
}
}
} | # 2016892, 2024-09-28 12:34:25, -PPPPPPPPPPPPPPP-- (83%)
#include <bits/stdc++.h>
using namespace std;
main(){
long n,d=2;
scanf("%ld",&n);
if(n<2) printf("No prime number factors for numbers less than 2");
else {
while(n>1){
if(d*d>n){
printf("%ld ",n);
break;
}
else if(n%d==0){
n/=d;
printf("%ld ",d);
}
else d++;
}
}
} | # 2017319, 2024-09-28 13:18:11, -PPPPPPPPPPPPPPP-- (83%)
#include <bits/stdc++.h>
using namespace std;
main(){
long n,d=2;
scanf("%ld",&n);
if(n<2) printf("No prime number factors for numbers less than 2.");
else {
while(n>1){
if(d*d>n){
printf("%ld ",n);
break;
}
else if(n%d==0){
n/=d;
printf("%ld ",d);
}
else d++;
}
}
} | # 2017327, 2024-09-28 13:18:45, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
main(){
long n,d=2;
scanf("%ld",&n);
if(n<2) printf("No prime factors for numbers less than 2.");
else {
while(n>1){
if(d*d>n){
printf("%ld ",n);
break;
}
else if(n%d==0){
n/=d;
printf("%ld ",d);
}
else d++;
}
}
} |
# 2017739, 2024-09-28 14:03:00, -TTxTTxTTTTTTTTT-- (0%)
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int d=2;
if(n<2){cout<<"No prime factors for number less than 2.";}
else{
while(n>1){
if(d*d>n){cout<<n;}
else {
if(n%d==0){
n/=d;
cout<<d<<' ';}
else{d+=1;}}
if(n<=1){break;}
}
}
} | # 2017851, 2024-09-28 14:11:01, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int d=2;
if(n<2){cout<<"No prime factors for numbers less than 2.";}
else{
while(n>1){
if(d*d>n){cout<<n; break;}
else {
if(n%d==0){
n/=d;
cout<<d<<' ';}
else{d+=1; }}
}
}
} | # 2017858, 2024-09-28 14:11:26, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int d=2;
if(n<2){cout<<"No prime factors for numbers less than 2.";}
else{
while(n>1){
if(d*d>n){cout<<n; break;}
else {
if(n%d==0){
n/=d;
cout<<d<<' ';}
else{d+=1; }}
}
}
} | # 2017882, 2024-09-28 14:12:32, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long n;
cin>>n;
long d=2;
if(n<2){cout<<"No prime factors for numbers less than 2.";}
else{
while(n>1){
if(d*d>n){cout<<n; break;}
else {
if(n%d==0){
n/=d;
cout<<d<<' ';}
else{d+=1; }}
}
}
} |
# 2014870, 2024-09-28 09:11:41, Compilation error (0%)
#include <iostream>
using namespace std;
int main(){
long N;
cin >> N;
long d = 2;
bool con = false;
if(N < 2){
cout << "No prime factors for number than 2.";
return 0;
}else{
while(true){
con = false;
if(N > 1){
while(true){
if(con)break;
if(d*d > N){
cout << "Prakob of N";
return 0;
}else{
if(N % d == 0){
N/=d;
cout << "Prakob of d";
continue;
}else{
d+=1;
con = true;
continue;
}
}
}
}else{
return 0;
}
}
} | # 2014880, 2024-09-28 09:12:21, ------------------ (0%)
#include <iostream>
using namespace std;
int main(){
long N;
cin >> N;
long d = 2;
bool con = false;
if(N < 2){
cout << "No prime factors for number than 2.";
return 0;
}else{
while(true){
con = false;
if(N > 1){
while(true){
if(con)break;
if(d*d > N){
cout << "Prakob of N";
return 0;
}else{
if(N % d == 0){
N/=d;
cout << "Prakob of d";
continue;
}else{
d+=1;
con = true;
continue;
}
}
}
}else{
return 0;
}
}
}
} | # 2014890, 2024-09-28 09:13:02, P---------------PP (16%)
#include <iostream>
using namespace std;
int main(){
long N;
cin >> N;
long d = 2;
bool con = false;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}else{
while(true){
con = false;
if(N > 1){
while(true){
if(con)break;
if(d*d > N){
cout << "Prakob of N";
return 0;
}else{
if(N % d == 0){
N/=d;
cout << "Prakob of d";
continue;
}else{
d+=1;
con = true;
continue;
}
}
}
}else{
return 0;
}
}
}
} | # 2014929, 2024-09-28 09:16:27, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long N;
cin >> N;
long d = 2;
bool con = false;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}else{
while(true){
con = false;
if(N > 1){
while(true){
if(con)break;
if(d*d > N){
cout << N << " ";
return 0;
}else{
if(N % d == 0){
N/=d;
cout << d << " ";
continue;
}else{
d+=1;
con = true;
continue;
}
}
}
}else{
return 0;
}
}
}
} |
# 2016890, 2024-09-28 12:34:18, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int n ,d = 2;
cin >> n;
if(n<2)cout << "No prime factors for numbers less than 2.";
else{
while(n>1){
if(n%d==0) {
n/=d;
cout << d << ' ';
}else{
d++;
}
}
}
} | # 2016956, 2024-09-28 12:39:26, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int n ,d = 2;
cin >> n;
if(n<2)cout << "No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d>n){
cout << n;
break;
}else if(n%d==0) {
n/=d;
cout << d << ' ';
}else{
d++;
}
}
}
} | # 2016968, 2024-09-28 12:40:58, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int n ,d = 2;
cin >> n;
if(n<2)cout << "No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d>n){
cout << n;
break;
}else if(n%d==0) {
n/=d;
cout << d << ' ';
}else{
d++;
}
}
}
} | # 2018029, 2024-09-28 14:25:55, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n ,d = 2;
cin >> n;
if(n<2)cout << "No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d>n){
cout << n;
break;
}else if(n%d==0) {
n/=d;
cout << d << ' ';
}else{
d++;
}
}
}
} |
# 2014829, 2024-09-28 09:08:44, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
#include<string>
#include<cmath>
#include<iomanip>
int main(){
long long N=0;
int d=2;
std::cin>>N;
if(N<2)std::cout<<"No prime factors for numbers lees than 2.";
else
{
while(N>1){
if(d*d>N)
{
std::cout<<N<<" ";
break;
}
else if(N%d==0){
N/=d;
std::cout<<d<<" ";
}
else d+=1;
}
}
} | # 2014831, 2024-09-28 09:08:52, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
#include<string>
#include<cmath>
#include<iomanip>
int main(){
long long N=0;
int d=2;
std::cin>>N;
if(N<2)std::cout<<"No prime factors for numbers lees than 2.";
else
{
while(N>1){
if(d*d>N)
{
std::cout<<N<<" ";
break;
}
else if(N%d==0){
N/=d;
std::cout<<d<<" ";
}
else d+=1;
}
}
} | # 2014838, 2024-09-28 09:09:24, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
#include<string>
#include<cmath>
#include<iomanip>
int main(){
long long N=0;
long long d=2;
std::cin>>N;
if(N<2)std::cout<<"No prime factors for numbers lees than 2.";
else
{
while(N>1){
if(d*d>N)
{
std::cout<<N<<" ";
break;
}
else if(N%d==0){
N/=d;
std::cout<<d<<" ";
}
else d+=1;
}
}
} | # 2014897, 2024-09-28 09:13:25, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
#include<string>
#include<cmath>
#include<iomanip>
int main(){
long long N=0;
long long d=2;
std::cin>>N;
if(N<2)std::cout<<"No prime factors for numbers less than 2.";
else
{
while(N>1){
if(d*d>N)
{
std::cout<<N<<" ";
break;
}
else if(N%d==0){
N/=d;
std::cout<<d<<" ";
}
else d+=1;
}
}
} |
# 2014827, 2024-09-28 09:08:20, -PPPPPPPPPPTPPPP-- (77%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factprs for numbers less than 2.";
}
else{
while(true){
if(n>1){
if(d*d>n){
cout << n << ' ';
break;}
else{
while(n%d==0){
n /= d;
cout << d << ' ';
}
d +=1;
//break;
}
}else{break;}
}
}
} | # 2014851, 2024-09-28 09:10:35, -PPPPPPPPPPPPPPP-- (83%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
long long d=2;
if(n<2){
cout << "No prime factprs for numbers less than 2.";
}
else{
while(true){
if(n>1){
if(d*d>n){
cout << n << ' ';
break;}
else{
while(n%d==0){
n /= d;
cout << d << ' ';
}
d +=1;
//break;
}
}else{break;}
}
}
} | # 2014895, 2024-09-28 09:13:23, -PPPPPPPPPPPPPPP-- (83%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
long long d=2;
if(n<2){
cout << "No prime factprs for numbers less than 2.";
}
else{
while(true){
if(n>1){
if(d*d>n){
cout << n << ' ';
break;}
else{
while(n%d==0){
n /= d;
cout << d << ' ';
}
d +=1;
continue;
}
}else{break;}
}
}
} | # 2014923, 2024-09-28 09:15:42, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
long long d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(true){
if(n>1){
if(d*d>n){
cout << n << ' ';
break;}
else{
while(n%d==0){
n /= d;
cout << d << ' ';
}
d +=1;
continue;
}
}else{break;}
}
}
} |
# 2016862, 2024-09-28 12:31:49, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
#include<cmath>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<string>
using namespace std;
int main(){
long long int N; cin >> N;
int d =2;
if(N<2) cout << "No prime factors for numbers less than 2.";
else{
while(N>1){if(N<=1){
}
else{
if(d*d>N){
cout << N << " ";
break;
}
else{
if(N%d==0){
while(N%d==0)
{N/=d;
cout << d << " ";}
d+= 1;
}
else d+= 1;
}
}}
}
} | # 2017520, 2024-09-28 13:37:28, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
long long int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2." << endl;
}
else{
while(n > 1){
if(d * d > n){
cout << n << endl;
break;
}
else{
if(n % d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
}
} | # 2017538, 2024-09-28 13:39:22, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
long long int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2." << endl;
}
else{
while(n > 1){
if(d * d > n){
cout << n << endl;
break;
}
else{
if(n % d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
}
} | # 2017567, 2024-09-28 13:43:03, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
long long int n;
cin >> n;
long long int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2." << endl;
}
else{
while(n > 1){
if(d * d > n){
cout << n << endl;
break;
}
else{
if(n % d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
}
} |
# 2014993, 2024-09-28 09:24:16, ------------------ (0%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main(){
long long N;
cin >> N ;
long long d = 2;
cout << d;
if(N<2 )cout<<"No prime factors for numbers less than 2.";
else{
for(;N>1;){
if(d*d >N ){cout << d << ' '; break;}
else{
for(;N%d==0;){N/=d; cout << d << ' ' ;}
d+=1;
}
}
}
} | # 2014996, 2024-09-28 09:24:33, PPP--P-P-P--P---PP (50%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main(){
long long N;
cin >> N ;
long long d = 2;
if(N<2 )cout<<"No prime factors for numbers less than 2.";
else{
for(;N>1;){
if(d*d >N ){cout << d << ' '; break;}
else{
for(;N%d==0;){N/=d; cout << d << ' ' ;}
d+=1;
}
}
}
} | # 2015084, 2024-09-28 09:33:48, PPP--P-P-P--P---PP (50%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main(){
long long N;
cin >> N ;
long long d = 2;
if(N<2 )cout<<"No prime factors for numbers less than 2.";
else{
for(;N>1;){
if(d*d >N ){cout << d << ' '; break;}
else{
for(;N%d==0;){N/=d; cout << d << ' ' ;}
d+=1;
}
}
}
} | # 2016122, 2024-09-28 11:15:37, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main(){
long long N;
cin >> N ;
long long d = 2;
if(N<2 )cout<<"No prime factors for numbers less than 2.";
else{
while(N>1){
if(d*d >N ){cout << N << ' '; break;}
else{
while((N%d)==0){N/=d; cout << d << ' ' ;}
d+=1;
}
}
}
} |
# 2014842, 2024-09-28 09:09:48, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (N > 1) {
if (d * d > N) {
cout << N << endl;
break;
}
while (N % d == 0) {
N /= d;
cout << d << ' ';
}
d++;
}
} | # 2015078, 2024-09-28 09:33:38, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (N > 1) {
if (d * d > N) {
cout << N << endl;
break;
}
while (N % d == 0) {
N /= d;
cout << d << ' ';
}
d++;
}
} | # 2015191, 2024-09-28 09:43:10, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (N > 1) {
if (d * d > N) {
cout << N << endl;
break;
}
while (N % d == 0) {
N /= d;
cout << d << ' ';
}
d++;
}
} | # 2015378, 2024-09-28 10:00:31, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
long long N;
cin >> N;
long long d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (N > 1) {
if (d * d > N) {
cout << N << endl;
break;
}
while (N % d == 0) {
N /= d;
cout << d << ' ';
}
d += 1;
}
} |
# 2015044, 2024-09-28 09:31:42, --P-PP-PPPP-PPPP-- (61%)
#include<iostream>
using namespace std;
int main(){
long long n;cin>>n;
long long d = 2;
int i=0;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}else{
while(n>1){
if(d*d > n){
cout<<" "<<n;
break;
}else{
if( n % d == 0){
n/=d;
if(i==0){cout<<d;}
else{cout<<" "<<d;}
i=1;
}else{
d++;
}
}
}
}
return 0;
} | # 2015053, 2024-09-28 09:32:20, P-P-PP-PPPP-PPPPPP (77%)
#include<iostream>
using namespace std;
int main(){
long long n;cin>>n;
long long d = 2;
int i=0;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d > n){
cout<<" "<<n;
break;
}else{
if( n % d == 0){
n/=d;
if(i==0){cout<<d;}
else{cout<<" "<<d;}
i=1;
}else{
d++;
}
}
}
}
return 0;
} | # 2015058, 2024-09-28 09:32:44, PP-P--P----P----PP (38%)
#include<iostream>
using namespace std;
int main(){
long long n;cin>>n;
long long d = 2;
int i=0;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d > n){
cout<<n;
break;
}else{
if( n % d == 0){
n/=d;
if(i==0){cout<<d;}
else{cout<<" "<<d;}
i=1;
}else{
d++;
}
}
}
}
return 0;
} | # 2015097, 2024-09-28 09:34:26, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long n;cin>>n;
long long d = 2;
int i=0;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d > n){
if(i==0){cout<<n;}
else{cout<<" "<<n;}
break;
}else{
if( n % d == 0){
n/=d;
if(i==0){cout<<d;}
else{cout<<" "<<d;}
i=1;
}else{
d++;
}
}
}
}
return 0;
} |
# 2017140, 2024-09-28 13:00:51, PTPTTPTPTPxTP-xxPP (44%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
}
else{
while(n%d==0){
n=n/d;
cout<<d<<" ";
continue;
}
}
d+=1;
continue;
}
}
} | # 2017172, 2024-09-28 13:04:53, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n=n/d;
cout<<d<<" ";
continue;
}
d+=1;
continue;
}
}
} | # 2018606, 2024-09-28 15:12:05, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n;
long long int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n=n/d;
cout<<d<<" ";
continue;
}
d+=1;
continue;
}
}
} |
# 2014966, 2024-09-28 09:21:16, PTPTTPTPTPxxPxxxPP (44%)
#include <iostream>
using namespace std;
int main() {
long long n,d;
cin>>n;
d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
} else {
while(n>1){
if(d*d>n){
cout<<n<<" ";
}else {
while(n%d==0){
n /= d;
cout<<d<<" ";
}
d+=1;
}
}
}
} | # 2015291, 2024-09-28 09:52:31, PTPTTPTPTPxxPxxxPP (44%)
#include <iostream>
using namespace std;
int main() {
int long long n,d;
cin>>n;
d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
} else {
while(n>1){
if(d*d>n){
cout<<n<<" ";
}else {
while(n%d==0){
n /= d;
cout<<d<<" ";
}
d+=1;
}
}
}
} | # 2015333, 2024-09-28 09:56:12, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
int long long n,d;
cin>>n;
d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
} else {
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}else {
while(n%d==0){
n /= d;
cout<<d<<" ";
}
d+=1;
}
}
}
} |
# 2014961, 2024-09-28 09:20:20, P-P--P-P-P--P---PP (44%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long int n,i=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}else{
while (n>1&&i*i<=n)
{
while(n%i==0){
cout << i<<" ";
n/=i;
}
i++;
}
}
} | # 2014994, 2024-09-28 09:24:19, P-P--P-P-PxxP---PP (44%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long int n,d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
cout << n;
}
while(n%d==0){
n/=d;
cout << d << " ";
}
d++;
}
}
} | # 2014999, 2024-09-28 09:25:05, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long int n,d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
cout << n;
return 0;
}
while(n%d==0){
n/=d;
cout << d << " ";
}
d++;
}
}
} |
# 2014959, 2024-09-28 09:20:13, PPPPPPPPPPPPPPPP-- (88%)
#include <bits/stdc++.h>
using namespace std;
int main(){
unsigned long long int n;
cin>>n;
unsigned long long int d=2;
if (n<2)
{
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else
{
p:
if (n>1)
{
if (d*d>n)
{
cout<<n<<" ";
return 0;
}
else
{
g:
if (n%d==0)
{
n/=d;
cout<<d<<" ";
goto g;
}
else
{
d+=1;
goto p;
}
}
}
}
return 0;
} | # 2014977, 2024-09-28 09:22:15, PPPPPPPPPPPPPPPP-- (88%)
#include <bits/stdc++.h>
using namespace std;
int main(){
unsigned long long int n;
cin>>n;
unsigned long long int d=2;
if (n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
p:
if (n>1)
{
if (d*d>n)
{
cout<<n<<" ";
}
else
{
g:
if (n%d==0)
{
n/=d;
cout<<d<<" ";
goto g;
}
else
{
d+=1;
goto p;
}
}
}
}
return 0;
} | # 2014981, 2024-09-28 09:22:57, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int d=2;
if (n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
p:
if (n>1)
{
if (d*d>n)
{
cout<<n<<" ";
}
else
{
g:
if (n%d==0)
{
n/=d;
cout<<d<<" ";
goto g;
}
else
{
d+=1;
goto p;
}
}
}
}
return 0;
} |
# 2016869, 2024-09-28 12:32:29, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int N;
int d=2;
cin>>N;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(N>1){
if(d*d>N){
cout<<N<<' ';
break;
}else{
while(N%d==0){
N/=d;
cout<<d<<' ';
}
d+=1;
}
}
}
} | # 2018678, 2024-09-28 15:15:23, Compilation error (0%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long longN;
long long d=2;
cin>>N;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(N>1){
if(d*d>N){
cout<<N<<' ';
break;
}else{
while(N%d==0){
N/=d;
cout<<d<<' ';
}
d+=1;
}
}
}
} | # 2018690, 2024-09-28 15:15:42, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long N;
long long d=2;
cin>>N;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while(N>1){
if(d*d>N){
cout<<N<<' ';
break;
}else{
while(N%d==0){
N/=d;
cout<<d<<' ';
}
d+=1;
}
}
}
} |
# 2014849, 2024-09-28 09:10:28, PPPPPPP-P-TTTTTTPP (55%)
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>> n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d > n){
cout<< n<< " ";
break;
}
else if(n%d==0){
n/=d;
cout<< d<< " ";
}
d+=1;
}
return 0;
} | # 2014881, 2024-09-28 09:12:25, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>> n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d > n){
cout<< n<< " ";
break;
}
while(n%d==0){
n/=d;
cout<< d<< " ";
}
d+=1;
}
return 0;
} | # 2014914, 2024-09-28 09:14:46, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>> n;
long long d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d > n){
cout<< n<< " ";
break;
}
while(n%d==0){
n/=d;
cout<< d<< " ";
}
d+=1;
}
return 0;
} |
# 2017225, 2024-09-28 13:09:36, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main(){
int n =0;
cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for number less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout << n <<" ";
return 0;
}
while(n % d ==0){
n /= d;
cout << d << " ";
}
d += 1;
}
if(n<=1) return 0;
} | # 2017246, 2024-09-28 13:11:00, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main(){
long long n =0;
cin >> n;
long long d = 2;
if(n<2){
cout << "No prime factors for number less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout << n <<" ";
return 0;
}
while(n % d ==0){
n /= d;
cout << d << " ";
}
d += 1;
}
if(n<=1) return 0;
} | # 2017339, 2024-09-28 13:19:35, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long n =0;
cin >> n;
long long d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout << n <<" ";
return 0;
}
while(n % d ==0){
n /= d;
cout << d << " ";
}
d += 1;
}
if(n<=1) return 0;
} |
# 2016848, 2024-09-28 12:30:22, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d = 2;
if (N >= 2)
{
while (N > 1)
{
if (d*d > N)
{
cout << N;
break;
} else
{
if (N%d == 0)
{
N/=d;
cout << d << " ";
} else
{
d+=1;
}
}
}
} else
{
cout << "No prime factors for numbers less than 2";
}
} | # 2017326, 2024-09-28 13:18:45, Compilation error (0%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d = 2;
if (N >= 2)
{
while (N > 1)
{
if (d*d > N)
{
cout << N;
break;
} else
{
if (N%d == 0)
{
N/=d;
cout << d << " ";
} else
{
d+=1;
}
}
}
} else
{
cout << "No prime factors for numbers less than 2.";
}
}#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d = 2;
if (N >= 2)
{
while (N > 1)
{
if (d*d > N)
{
cout << N;
break;
} else
{
if (N%d == 0)
{
N/=d;
cout << d << " ";
} else
{
d+=1;
}
}
}
} else
{
cout << "No prime factors for numbers less than 2.";
}
} | # 2017332, 2024-09-28 13:19:06, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d = 2;
if (N >= 2)
{
while (N > 1)
{
if (d*d > N)
{
cout << N;
break;
} else
{
if (N%d == 0)
{
N/=d;
cout << d << " ";
} else
{
d+=1;
}
}
}
} else
{
cout << "No prime factors for numbers less than 2.";
}
} |
# 2016873, 2024-09-28 12:33:04, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while (true)
{
do
{
if (n % d != 0)
{
d++;
}
if (n > 1)
{
if (d * d > n)
{
cout << n;
exit(0);
}
}
else
{
exit(0);
}
} while (n % d != 0);
n /= d;
cout << d << " ";
}
}
} | # 2016970, 2024-09-28 12:41:03, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
do
{
if (n % d != 0)
{
d++;
}
if (n > 1)
{
if (d * d > n)
{
cout << n;
exit(0);
}
}
else
{
exit(0);
}
} while (n % d != 0);
n /= d;
cout << d << " ";
}
}
} | # 2016996, 2024-09-28 12:44:49, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
do
{
if (n % d != 0)
{
d++;
}
if (n > 1)
{
if (d * d > n)
{
cout << n << endl;
exit(0);
}
}
else
{
cout << endl;
exit(0);
}
} while (n % d != 0);
n /= d;
cout << d << " ";
}
}
} |
# 2015177, 2024-09-28 09:42:19, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}else {
while (N > 1)
{
if (d*d > N) {
cout << N;
return 0;
}
else {
while (N % d == 0)
{
N /= d;
cout << d << ' ';
}
d += 1;
}
}
}
} | # 2015182, 2024-09-28 09:42:35, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}else {
while (N > 1)
{
if (d*d > N) {
cout << N;
return 0;
}
else {
while (N % d == 0)
{
N /= d;
cout << d << ' ';
}
d += 1;
}
}
}
} | # 2015700, 2024-09-28 10:33:03, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
long long N;
cin >> N;
long long d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}else {
while (N > 1)
{
if (d*d > N) {
cout << N;
return 0;
}
else {
while (N % d == 0)
{
N /= d;
cout << d << ' ';
}
d += 1;
}
}
return 0;
}
} |
# 2016834, 2024-09-28 12:28:48, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2";
return 0;
}
else {
while (n > 1){
if (d *d > n){
cout << n;
return 0;
}
else {
while (n % d == 0){
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
} | # 2016839, 2024-09-28 12:29:10, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin >> n;
long long int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2";
return 0;
}
else {
while (n > 1){
if (d *d > n){
cout << n;
return 0;
}
else {
while (n % d == 0){
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
} | # 2016842, 2024-09-28 12:29:32, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long int n;
cin >> n;
long long int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else {
while (n > 1){
if (d *d > n){
cout << n;
return 0;
}
else {
while (n % d == 0){
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
} |
# 2014906, 2024-09-28 09:13:55, ------------------ (0%)
#include <bits/stdc++.h>
int main(){
long long n ;
std::cin >> n;
long long d =2;
std::string factor = "";
if(n<2){
std::cout << "No prime factor for number less than 2";
}else{
while(n>1){
if(d*d>n){
break;
}else{
if(n%d==0){
n/=d;
factor+=std::to_string(d)+" ";
}else{
d++;
}
}
}
factor.pop_back();
std::cout << factor;
}
} | # 2014963, 2024-09-28 09:20:38, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
int main(){
long long n ;
std::cin >> n;
long long d =2;
std::string factor = "";
if(n<2){
std::cout << "No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
factor+=std::to_string(n)+" ";
break;
}else{
if(n%d==0){
n/=d;
factor+=std::to_string(d)+" ";
}else{
d++;
}
}
}
factor.pop_back();
std::cout << factor;
}
} | # 2015071, 2024-09-28 09:33:21, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
int main(){
long long n ;
std::cin >> n;
long long d =2;
std::string factor = "";
if(n<2){
std::cout << "No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
factor+=std::to_string(n)+" ";
break;
}else{
if(n%d==0){
n/=d;
factor+=std::to_string(d)+" ";
}else{
d++;
}
}
}
factor.pop_back();
std::cout << factor;
}
} |
# 2014954, 2024-09-28 09:19:36, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main() {
long long int number; cin >> number;
long long int d = 2;
if(number < 2) cout << "No prime fractors for numbers less than than 2.";
else {
while(number >= 1) {
if(d*d > number) {
cout << number << ' ';
break;
}
else {
if(number % d == 0) {
cout << d << ' ';
number /= d;
} else d += 1;
}
}
}
} | # 2014964, 2024-09-28 09:20:49, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main() {
long long int number; cin >> number;
long long int d = 2;
if(number < 2) cout << "No prime factors for numbers less than than 2.";
else {
while(number >= 1) {
if(d*d > number) {
cout << number << ' ';
break;
}
else {
if(number % d == 0) {
cout << d << ' ';
number /= d;
} else d += 1;
}
}
}
} | # 2015341, 2024-09-28 09:57:01, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main() {
long long int number; cin >> number;
long long int d = 2;
if(number < 2) cout << "No prime factors for numbers less than 2.";
else {
while(number >= 1) {
if(d*d > number) {
cout << number << ' ';
break;
}
else {
if(number % d == 0) {
cout << d << ' ';
number /= d;
} else d += 1;
}
}
}
} |
# 2016832, 2024-09-28 12:28:34, PPP--P-P-P--P---PP (50%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
long long d=2;
if(n<2)cout<<"No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d>n){
cout<<d<<" ";return 0;
}else if(!(n%d)){
n/=d;
cout<<d<<" ";
}else d++;
}
cout<<d<<" ";
}
} | # 2016838, 2024-09-28 12:29:05, PPP--P-P-P-------- (33%)
#include <bits/stdc++.h>
using namespace std;
int main(){
unsigned int n;
cin>>n;
unsigned int d=2;
if(n<2)cout<<"No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d>n){
cout<<d<<" ";return 0;
}else if(!(n%d)){
n/=d;
cout<<d<<" ";
}else d++;
}
cout<<d<<" ";
}
} | # 2016866, 2024-09-28 12:32:07, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
long long d=2;
if(n<2)cout<<"No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";return 0;
}else{
if(!(n%d)){
n/=d;
cout<<d<<" ";
}else d++;
}
}
cout<<d<<" ";
}
} |
# 2016881, 2024-09-28 12:33:51, P-PxxPxPxPxxPxxxPP (44%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n>=2){
if(n>1){
if(d*d<=n){
while(n>1){
if(d*d<=n){
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
else cout<<"ah";
}
}
else {
cout<<3;
return 0;
}
}
else return 0;
}
else cout<<"No prime factors for numbers less than 2.";
} | # 2017009, 2024-09-28 12:46:27, P-PPPPPPPPPPPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n>=2){
if(n>1){
if(d*d<=n){
while(n>1){
if(d*d<=n){
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
else {
cout<<n;
return 0;
}
}
return 0;
}
else {
cout<<3;
return 0;
}
}
else return 0;
}
else cout<<"No prime factors for numbers less than 2.";
} | # 2017022, 2024-09-28 12:47:24, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
long long d=2;
cin>>n;
if(n>=2){
if(n>1){
if(d*d<=n){
while(n>1){
if(d*d<=n){
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
else {
cout<<n;
return 0;
}
}
return 0;
}
else {
cout<<n;
return 0;
}
}
else return 0;
}
else cout<<"No prime factors for numbers less than 2.";
} |
# 2016826, 2024-09-28 12:28:02, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if (n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}
else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
return 0;
} | # 2016831, 2024-09-28 12:28:30, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if (n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}
else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
return 0;
} | # 2016877, 2024-09-28 12:33:46, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
long long d=2;
if (n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}
else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}else {
d+=1;
}
}
}
}
return 0;
} |
# 2016885, 2024-09-28 12:34:05, PTPTTPTPTPxTPxxxPP (44%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin >> n ;
int d = 2 ;
if( n < 2 ){
cout << "No prime factors for numbers less than 2.";
}else{
while( n > 1){
if( d*d > n ){
cout << n << " ";
}else{
while( n%d == 0 ){
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2016923, 2024-09-28 12:36:40, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin >> n ;
int d = 2 ;
if( n < 2 ){
cout << "No prime factors for numbers less than 2.";
}else{
while( n > 1){
if( d*d > n ){
cout << n << " ";
break;
}else{
while( n%d == 0 ){
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2018714, 2024-09-28 15:16:38, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin >> n ;
long long int d = 2 ;
if( n < 2 ){
cout << "No prime factors for numbers less than 2.";
}else{
while( n > 1){
if( d*d > n ){
cout << n << " ";
break;
}else{
while( n%d == 0 ){
n /= d;
cout << d << ' ' ;
}
d += 1;
}
}
}
} |
# 2014832, 2024-09-28 09:08:55, PTPTTPTPTPTTTTTTPP (38%)
#include <iostream>
using namespace std;
int main(){
int n, d = 2;
cin >> n;
if(n < 2)
cout << "No prime factors for numbers less than 2." << endl;
else
while (n > 1){
if (d * d > n){
cout << n << " ";
} else {
while (n % d == 0){
n /= d;
cout << d << " ";
}
d+=1;
}
}
} | # 2014874, 2024-09-28 09:12:04, PTTTTTTTTTTTTTTTPP (16%)
#include <iostream>
using namespace std;
int main()
{
int n, d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2." << endl;
}
else
{
while (n > 1)
{
if (d * d > n)
{
cout << n << " ";
}
else
{
if (n % d == 0)
{
n /= d;
cout << d << " ";
}
else
{
d += 1;
}
}
}
}
} | # 2015013, 2024-09-28 09:27:10, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main()
{
long n, d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2." << endl;
}
else
{
while (true)
{
if (n > 1)
{
if (d * d > n)
{
cout << n << " ";
break;
}
else
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d += 1;
}
}
else
{
break;
}
}
}
} |
# 2016880, 2024-09-28 12:33:50, -PPPPPPPPPPTPPPP-- (77%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int N;
cin >> N;
int d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2";
return 0;
}
else{
while(N>1){
if(d*d>N){
cout << N;
return 0;
}
else{
while(N%d==0){
N/=d;
cout << d << ' ';
}
d+=1;
}
}
}
} | # 2016910, 2024-09-28 12:35:49, -PPPPPPPPPPPPPPP-- (83%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int N;
cin >> N;
long long int d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2";
return 0;
}
else{
while(N>1){
if(d*d>N){
cout << N;
return 0;
}
else{
while(N%d==0){
N/=d;
cout << d << ' ';
}
d+=1;
}
}
}
} | # 2016965, 2024-09-28 12:40:42, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int N;
cin >> N;
long long int d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(N>1){
if(d*d>N){
cout << N;
return 0;
}
else{
while(N%d==0){
N/=d;
cout << d << ' ';
}
d+=1;
}
}
}
} |
# 2014835, 2024-09-28 09:09:17, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if (d * d > n)
{
cout << n << " ";
break;
}
else
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2014843, 2024-09-28 09:09:52, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if (d * d > n)
{
cout << n << " ";
break;
}
else
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2014884, 2024-09-28 09:12:36, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n, d = 2;
cin >> n;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if (d * d > n)
{
cout << n << " ";
break;
}
else
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} |
# 2016984, 2024-09-28 12:43:23, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main(){
long long N;cin>>N;
long long d = 2;
while(N<2){
cout<<"NO prime factors for numbers less than 2.";
return 0;
}
string sum = "";
while(N>=2){
while(N>1){
if((d*d)>N){
sum += to_string(N);
cout<<sum;
return 0;
}else{
if(N%d == 0){
N /=d;
sum += to_string(d) + " ";
}else{
d++;
}
}
}
while(N<=1){
return 0;
}
}
return 0;
} | # 2017025, 2024-09-28 12:47:50, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
long long N;cin>>N;
long long d = 2;
while(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
string sum = "";
while(N>=2){
while(N>1){
if((d*d)>N){
sum += to_string(N);
cout<<sum;
return 0;
}else{
if(N%d == 0){
N /=d;
sum += to_string(d) + " ";
}else{
d++;
}
}
}
while(N<=1){
return 0;
}
}
return 0;
}#include<iostream>
using namespace std;
int main(){
long long N;cin>>N;
long long d = 2;
while(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
string sum = "";
while(N>=2){
while(N>1){
if((d*d)>N){
sum += to_string(N);
cout<<sum;
return 0;
}else{
if(N%d == 0){
N /=d;
sum += to_string(d) + " ";
}else{
d++;
}
}
}
while(N<=1){
return 0;
}
}
return 0;
}#include<iostream>
using namespace std;
int main(){
long long N;cin>>N;
long long d = 2;
while(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
string sum = "";
while(N>=2){
while(N>1){
if((d*d)>N){
sum += to_string(N);
cout<<sum;
return 0;
}else{
if(N%d == 0){
N /=d;
sum += to_string(d) + " ";
}else{
d++;
}
}
}
while(N<=1){
return 0;
}
}
return 0;
}#include<iostream>
using namespace std;
int main(){
long long N;cin>>N;
long long d = 2;
while(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
string sum = "";
while(N>=2){
while(N>1){
if((d*d)>N){
sum += to_string(N);
cout<<sum;
return 0;
}else{
if(N%d == 0){
N /=d;
sum += to_string(d) + " ";
}else{
d++;
}
}
}
while(N<=1){
return 0;
}
}
return 0;
} | # 2017029, 2024-09-28 12:47:58, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long N;cin>>N;
long long d = 2;
while(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
string sum = "";
while(N>=2){
while(N>1){
if((d*d)>N){
sum += to_string(N);
cout<<sum;
return 0;
}else{
if(N%d == 0){
N /=d;
sum += to_string(d) + " ";
}else{
d++;
}
}
}
while(N<=1){
return 0;
}
}
return 0;
} |
# 2014879, 2024-09-28 09:12:17, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
// void nDiv_d(long long n, int d){
// n /= d;
// cout << d << ' ';
// }
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2." << endl;
}else while(n > 1){
if(d*d > n){
cout << n << ' ';
break;
}else while(n%d == 0){
n /= d;
cout << d << ' ';
}
d++;
}
} | # 2014885, 2024-09-28 09:12:37, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
// void nDiv_d(long long n, int d){
// n /= d;
// cout << d << ' ';
// }
int main(){
long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2." << endl;
}else while(n > 1){
if(d*d > n){
cout << n << ' ';
break;
}else while(n%d == 0){
n /= d;
cout << d << ' ';
}
d++;
}
} | # 2014917, 2024-09-28 09:15:13, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2." << endl;
}else while(n > 1){
if(d*d > n){
cout << n << ' ';
break;
}else while(n%d == 0){
n /= d;
cout << d << ' ';
}
d++;
}
} |
# 2016917, 2024-09-28 12:36:28, -PP--P-P-P--P----- (33%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin>>n;
unsigned long long int d=2;
if(n<2){cout<<"No prime factors for numbers less than 2";
return 0;}
while(n>=2){
while(n>1){
if(d*d>n){
cout<<d<<" ";
return 0;
}
else{
while(n%d==0){
n=n/d;
cout<<d<<" ";
}
d+=1;
}
}
return 0;
}
} | # 2017324, 2024-09-28 13:18:35, PPP--P-P-P--P---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin>>n;
unsigned long long int d=2;
if(n<2){cout<<"No prime factors for numbers less than 2.";
return 0;}
while(n>=2){
while(n>1){
if(d*d>n){
cout<<d<<" ";
return 0;
}
else{
while(n%d==0){
n=n/d;
cout<<d<<" ";
}
d+=1;
}
}
return 0;
}
} | # 2017921, 2024-09-28 14:16:34, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin>>n;
unsigned long long int d=2;
if(n<2){cout<<"No prime factors for numbers less than 2.";
return 0;}
while(n>=2){
while(n>1){
if((d*d)>n){
cout<<n<<" ";
return 0;
}
else{
while(n%d==0){
n=n/d;
cout<<d<<" ";
}
d+=1;
}
}
return 0;
}
} |
# 2014861, 2024-09-28 09:11:10, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(n > 1){
if(d * d > n){
cout << n << ' ';
return 0;
}
else{
if(n % d == 0){
n /= d;
cout << d << ' ';
}
else d++;
}
}
}
} | # 2014889, 2024-09-28 09:12:54, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(n > 1){
if(d * d > n){
cout << n << ' ';
return 0;
}
else{
if(n % d == 0){
n /= d;
cout << d << ' ';
}
else d++;
}
}
}
} |
# 2017291, 2024-09-28 13:15:28, PPPPPPPPPPPPPPPP-- (88%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
unsigned long long n;
cin >> n;
unsigned long long d = 2;
if (n<2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
while(true)
{
if (n>1)
{
if (d*d>n)
{
cout << n;
return 0;
}
else
{
while(true)
{
if (n%d==0)
{
n/=d;
cout << d << " ";
}
else
{
d+=1;
break;
}
}
}
}
else
{
break;
}
}
}
} | # 2017323, 2024-09-28 13:18:28, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int64_t n;
cin >> n;
int64_t d = 2;
if (n<2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
while(true)
{
if (n>1)
{
if (d*d>n)
{
cout << n;
return 0;
}
else
{
while(true)
{
if (n%d==0)
{
n/=d;
cout << d << " ";
}
else
{
d+=1;
break;
}
}
}
}
else
{
break;
}
}
}
} |
# 2016989, 2024-09-28 12:43:48, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std ;
int main() {
long long int N ;
cin >> N ;
long long int d = 2 ;
if (N < 2) {
cout << "No prime factors for number less than 2." ;
}
else {
// start find prime
while (N > 1) {
if (d*d > N) { cout << N << " " ; break ;}
else {
while (N%d == 0) {
N /= d ;
cout << d << " " ;
}
d += 1 ;
}
}
}
} | # 2016993, 2024-09-28 12:44:32, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std ;
int main() {
long long int N ;
cin >> N ;
long long int d = 2 ;
if (N < 2) {
cout << "No prime factors for numbers less than 2." ;
}
else {
// start find prime
while (N > 1) {
if (d*d > N) { cout << N << " " ; break ;}
else {
while (N%d == 0) {
N /= d ;
cout << d << " " ;
}
d += 1 ;
}
}
}
} |
# 2015485, 2024-09-28 10:11:19, PT-TTTTTTTTTTTTTPP (16%)
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
int main(){
long long n,d=2;
//cout<<"hi"<<endl;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
}
else{
while (n>1){
if(d*d > n){
bool first=true;
for(long long i=2;i<ceil(sqrt(n));i++){
while(n!=1){
if(n%i==0 and first){
cout<<i;
n=n/i;
first=false;
}
if(n%i==0 and !(first)){
cout<<i<<' ';
n=n/d;
}
}
break;
}
}
else{
while (n%d==0){
n/=d;
bool firstt=true;
for(long long i=2;i<ceil(sqrt(n));i++){
while(d!=1){
if(d%i==0 and firstt){
cout<<i;
d=d/i;
firstt=false;
}
if(d%i==0 and !(firstt)){
cout<<i<<' ';
d=d/i;
}
}
break;
}
}
d+=1;
continue;
}
}
}
} | # 2016719, 2024-09-28 11:57:36, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
bool prime(long long n){
if(n==1) return false;
for(long long i=2;i<ceil(sqrt(n)); i++){
if(n%i==0){
return false;
}
}
return true;
}
int main(){
long long n,d=2;
//cout<<"hi"<<endl;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
}
else{
while (n>1){
if(d*d > n){
bool first=true;
if(prime(n)){
cout<<n<<' ';
break;
}
}
else{
while (n%d==0){
n/=d;
bool firstt=true;
if(prime(d)){
cout<<d<<' ';
}
}
d+=1;
continue;
}
}
}
} |
# 2016907, 2024-09-28 12:35:25, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long num;
cin >> num;
int d = 2;
if (num < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (num > 1)
{
if (d * d > num)
{
cout << num << " ";
num /= num;
}
else
{
if (num % d == 0)
{
num /= d;
cout << d << " ";
}
else
{
d++;
}
}
}
}
} | # 2016926, 2024-09-28 12:36:56, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long num;
cin >> num;
long long d = 2;
if (num < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (num > 1)
{
if (d * d > num)
{
cout << num << " ";
num /= num;
}
else
{
if (num % d == 0)
{
num /= d;
cout << d << " ";
}
else
{
d++;
}
}
}
}
} |
# 2014922, 2024-09-28 09:15:38, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int d=2;
long long int size=pow(10,20);
long long int out[size];
long long int idx=0;
if (n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else{
while (n>1){
if (d*d>n){
cout<<n<<" ";
break;
}
else{
if (n%d==0){
while (n%d==0){
n/=d;
cout<<d<<" ";
}
}
else{
d+=1;
}
}
}
}
} | # 2015087, 2024-09-28 09:33:51, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int d=2;
long long int size=pow(10,20);
long long int out[size];
long long int idx=0;
if (n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else{
while (n>1){
if (d*d>n){
cout<<n<<" ";
break;
}
else{
if (n%d==0){
while (n%d==0){
n/=d;
cout<<d<<" ";
}
}
else{
d+=1;
}
}
}
}
}
//ENG_EXAM_WEEK |
# 2016936, 2024-09-28 12:37:54, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.\n";
}else{
int d = 2;
while(n > 1){
if(d*d > n){
cout << n << " ";
break;
}
while(n % d == 0){
n /= d;
cout << d << " ";
}
d++;
}
}
} | # 2018716, 2024-09-28 15:16:40, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.\n";
}else{
while(n > 1){
if(d*d > n){
cout << n << " ";
break;
}
while(n && n % d == 0){
n /= d;
cout << d << " ";
}
d++;
}
}
} |
# 2016851, 2024-09-28 12:30:41, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
long long n;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(1)
{
if(n > 1)
{
if(d*d > n)
{
cout << n;
break;
}
else
{
if(n % d == 0)
{
n = n / d;
cout << d << " ";
}
else
{
d++;
}
}
}
}
}
return 0;
} | # 2016981, 2024-09-28 12:42:34, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
long long n;
cin >> n;
long long d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(1)
{
if(n > 1)
{
if(d*d > n)
{
cout << n;
break;
}
else
{
if(n % d == 0)
{
n = n / d;
cout << d << " ";
}
else
{
if(d == 2)
{
d++;
}
else if(d % 10 == 3 && d / 10 != 0)
{
d = d + 4;
}
else
{
d = d + 2;
}
//cout << d << " ";
}
}
}
}
}
return 0;
} |
# 2016824, 2024-09-28 12:27:01, -PPPPPPPPPTTTTTT-- (50%)
#include "bits/stdc++.h"
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if( n<2 ){
cout << "No prime factors for number less than 2.";
return 0;
}
else {
while (n>1){
if( d*d > n){
cout << n << " ";
return 0;
}
else {
while( n%d == 0){
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} | # 2016843, 2024-09-28 12:29:36, PPPPPPPPPPPPPPPPPP (100%)
#include "bits/stdc++.h"
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if( n<2 ){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else {
while (n>1){
if( d*d > n){
cout << n << " ";
return 0;
}
else {
while( n%d == 0){
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} |
# 2016882, 2024-09-28 12:33:56, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n >1){
if(d*d > n){
cout << n << " ";
break;
}else{
while(n % d == 0){
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} | # 2017014, 2024-09-28 12:46:46, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n >1){
if(d*d > n){
cout << n << " ";
break;
}else{
while(n % d == 0){
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} |
# 2018074, 2024-09-28 14:30:48, PPPPPPPPPPPPPPPP-- (88%)
#include <iostream>
using namespace std;
int main()
{
unsigned long long int N,d = 2;
cin >> N;
if(N<2){cout << "No prime factors for numbers less than 2.";return 0;}
while(N != 1)
{
if(d*d > N){cout << N << ' ';N /= N;}
if(N%d == 0){N /= d;cout << d << ' ';}
else{d++;}
}
} | # 2018081, 2024-09-28 14:31:29, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main()
{
long long int N,d = 2;
cin >> N;
if(N<2){cout << "No prime factors for numbers less than 2.";return 0;}
while(N != 1)
{
if(d*d > N){cout << N << ' ';N /= N;}
if(N%d == 0){N /= d;cout << d << ' ';}
else{d++;}
}
} |
# 2017007, 2024-09-28 12:46:13, PPP--P-P-PxTP---PP (50%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
// cout << "hello" << endl;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}else{
if(n>1){
if(d*d>n){
//show factor
cout << n << " ";
}else{
while(n%d==0){
n/=d;
cout << d << " ";
}
while(n%d!=0){
d+=1;
//go to (N>1)
if(n>1){
if(d*d>n){
//show factor
cout << n << " ";
}else{
while(n%d==0){
n/=d;
cout << d << " ";
}
}
}else{
//stop
return 0;
}
}
}
}else{
//stop
return 0;
}
}
} | # 2017071, 2024-09-28 12:52:10, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
// cout << "hello" << endl;
long long d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}else{
if(n>1){
if(d*d>n){
//show factor
cout << n << " ";
return 0;
}else{
while(n%d==0){
n/=d;
cout << d << " ";
}
while(n%d!=0){
d+=1;
//go to (N>1)
if(n>1){
if(d*d>n){
//show factor
cout << n << " ";
return 0;
}else{
while(n%d==0){
n/=d;
cout << d << " ";
}
}
}else{
//stop
return 0;
}
}
}
}else{
//stop
return 0;
}
}
} |
# 2014946, 2024-09-28 09:18:29, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long N;
cin >>N;
int d=2;
if(N<2) cout<<"No prime factors for numbers less than 2.";
else
{
for(;N>1;)
{
if(d*d>N) {cout<<N;break;}
else
{
while(N%d==0)
{
N/=d;
cout<<d<<" ";
}
d++;
}
}
}
} | # 2014979, 2024-09-28 09:22:38, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main()
{
long N;
cin >>N;
long d=2;
if(N<2) cout<<"No prime factors for numbers less than 2.";
else
{
for(;N>1;)
{
if(d*d>N) {cout<<N;break;}
else
{
while(N%d==0)
{
N/=d;
cout<<d<<" ";
}
d++;
}
}
}
} |
# 2014942, 2024-09-28 09:18:13, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
long N;
cin >> N;
long d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while (N > 1){
if(d*d > N){
cout << N << ' ';
outed = true;
break;
}
else if (N % d == 0){
while (N % d == 0){
N/=d;
cout << d << ' ';
}
}
else {
d += 1;
}
}
}
} | # 2014949, 2024-09-28 09:18:44, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long N;
cin >> N;
long d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while (N > 1){
if(d*d > N){
cout << N << ' ';
break;
}
else if (N % d == 0){
while (N % d == 0){
N/=d;
cout << d << ' ';
}
}
else {
d += 1;
}
}
}
} |
# 2014878, 2024-09-28 09:12:17, PTPxTPxPTPxxPxxxPP (44%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define sz(x) (int)x.size()
#define arr_(x) (int)sizeof(x)/sizeof(x[0])
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
ll n; cin >> n;
ll d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2."<<endl ;
return 0;
}
else{
while(n>1){
if(d*d > n){
cout << n << " " ;
}
else{
while(n%d==0){
n/=d;
cout << d << " " ;
}
d+=1;
}
}
return 0;
}
} | # 2014903, 2024-09-28 09:13:41, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define sz(x) (int)x.size()
#define arr_(x) (int)sizeof(x)/sizeof(x[0])
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
ll n; cin >> n;
ll d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2."<<endl ;
return 0;
}
else{
while(n>1){
if(d*d > n){
cout << n << " " ;
return 0;
}
else{
while(n%d==0){
n/=d;
cout << d << " " ;
}
d+=1;
}
}
return 0;
}
} |
# 2014989, 2024-09-28 09:23:30, PTPTTPTPTPTTPTTTPP (44%)
#include <iostream>
using namespace std;
int main () {
long long N;
long long d=2;
cin >> N;
if (N<2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
while (true) {
if (N>1) {
if (d*d>N) {
cout << N << endl;
} else {
while (N>=1) {
if (N%d==0) {
N/=d;
cout << d << " ";
} else {
d+=1;
break;
}
}
}
} else break;
}
}
} | # 2015281, 2024-09-28 09:51:50, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main () {
long long N;
long long d=2;
cin >> N;
if (N<2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
while (true) {
if (N>1) {
if (d*d>N) {
cout << N << endl;
break;
} else {
while (N>1) {
if (N%d==0) {
N/=d;
cout << d << " ";
} else {
d+=1;
break;
}
}
}
} else break;
}
}
} |
# 2015674, 2024-09-28 10:30:56, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long n; cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
while (n > 1) {
if (d*d > n) {
cout << n << endl;
break;
}
else {
while (true) {
if (n%d == 0) {
n /= d;
cout << d << ' ';
}
else {
d += 1;
break;
}
}
}
}
}
} | # 2015697, 2024-09-28 10:32:59, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long n; cin >> n;
long d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
while (n > 1) {
if (d*d > n) {
cout << n << endl;
break;
}
else {
while (true) {
if (n%d == 0) {
n /= d;
cout << d << ' ';
}
else {
d += 1;
break;
}
}
}
}
}
} |
# 2015298, 2024-09-28 09:52:45, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
void pf(int n)
{
}
int main()
{
int n,d=2;
cin >>n;
if(n<2) cout << "No prime factors for numbers less than 2.";
else
{
if(n>1)
{
while (n>1)
{
if(d*d > n)
{
// pf(n);
cout << n <<" ";
return 0;
}
else
{
while (n%d ==0)
{
n /= d;
cout << d << " ";
}
d++;
}
}
}
else
{
return 0;
}
}
} | # 2015312, 2024-09-28 09:53:43, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int n,d=2;
cin >>n;
if(n<2) cout << "No prime factors for numbers less than 2.";
else
{
if(n>1)
{
while (n>1)
{
if(d*d > n)
{
// pf(n);
cout << n <<" ";
return 0;
}
else
{
while (n%d ==0)
{
n /= d;
cout << d << " ";
}
d++;
}
}
}
else
{
return 0;
}
}
} |
# 2014883, 2024-09-28 09:12:32, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main() {
long long N;
cin >> N;
long long d = 2;
if (N < 2) {
cout << "No prime factors for number less than 2.";
} else {
for (int i = 0; N > 1; i++) {
if (d*d > N) {
cout << N << " ";
break;
} else {
for (int j = 0; N % d == 0; j++) {
N /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2014892, 2024-09-28 09:13:08, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main() {
long long N;
cin >> N;
long long d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
} else {
for (int i = 0; N > 1; i++) {
if (d*d > N) {
cout << N << " ";
break;
} else {
for (int j = 0; N % d == 0; j++) {
N /= d;
cout << d << " ";
}
d += 1;
}
}
}
} |
# 2017096, 2024-09-28 12:55:13, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main (){
long long int N;
cin >> N;
long long int d = 2;
if (N < 2){
cout << "No prime factor for numbers less than 2.";
} else {
while (N > 1){
if (d * d > N){
cout << N << " ";
break;
} else if (N % d == 0){
N /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
} | # 2017120, 2024-09-28 12:57:38, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main (){
long long int N;
cin >> N;
long long int d = 2;
if (N < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (N > 1){
if (d * d > N){
cout << N << " ";
break;
} else if (N % d == 0){
N /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
} |
# 2016864, 2024-09-28 12:31:50, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long N;
cin>>N;
int d=2;
if (N < 2){
cout<<"No prime factors for numbers less than 2.";
} else {
while (N>1){
if (d*d > N) {
cout<<N;
break;
}
while (N%d == 0) {
N/=d;
cout<<d<<" ";
}
d+=1;
}
}
} | # 2017379, 2024-09-28 13:24:46, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
long long N;
cin>>N;
long long d=2;
if (N < 2){
cout<<"No prime factors for numbers less than 2.";
} else {
while (N>1){
if (d*d > N) {
cout<<N;
break;
}
while (N%d == 0) {
N/=d;
cout<<d<<" ";
}
d+=1;
}
}
} |
# 2016925, 2024-09-28 12:36:54, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
}
else {
while (n > 1){
if (d * d > n){
cout << n << " " ;
break;
}
else {
while (n % d == 0){
n /= d;
cout << d << " ";
}
if (n % d != 0) {
d += 1;
}
}
}
}
} | # 2016992, 2024-09-28 12:44:07, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2 ;
long long k = sqrt(n) + 1;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
}
else {
while (n > 1){
if (d * d > n){
cout << n << " " ;
break;
}
else {
while (n % d == 0){
n /= d;
cout << d << " ";
}
if (n % d != 0) {
d += 1;
if (d > k){
return 0;
}
}
}
}
}
} |
# 2016872, 2024-09-28 12:32:56, -PPPPPPPPPPPPPPP-- (83%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2";
}
else{
while(n>1){
if(d*d>n){
cout << n;
break;
}
else{
while(n%d==0){
n=n/d;
cout << d << " ";
}
d++;
}
}
}
} | # 2016878, 2024-09-28 12:33:48, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout << n;
break;
}
else{
while(n%d==0){
n=n/d;
cout << d << " ";
}
d++;
}
}
}
} |
# 2014926, 2024-09-28 09:16:10, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main(){
long N;
cin >> N;
long d = 2;
if (N<2) {
cout << "No prime factors for numbers less than 2";
} else {
while (N>1) {
if (d*d>N) {
cout << N << " ";
break;
} else {
while (N%d==0) {
N /=d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} | # 2014938, 2024-09-28 09:17:41, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long N;
cin >> N;
long d = 2;
if (N<2) {
cout << "No prime factors for numbers less than 2.";
return 0;
} else {
while (N>1) {
if (d*d>N) {
cout << N << " ";
break;
} else {
while (N%d==0) {
N /=d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} |
# 2016856, 2024-09-28 12:31:05, PPP--P-P-P-TP---PP (50%)
#include<bits/stdc++.h>
using namespace std;
main()
{
long long n;
int d =2;
cin >>n;
if (n<2)
{
cout <<"No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if (d*d>n)
{
cout <<d<<" ";
break;
}
else
{
while(n%d==0)
{
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
} | # 2016899, 2024-09-28 12:34:53, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n,d =2;
cin >>n;
if (n<2)
{
cout <<"No prime factors for numbers less than 2.";
}
else
{
while(n>1)
{
if (d*d>n)
{
cout <<n<<" ";
break;
}
else
{
while(n%d==0)
{
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
} |
# 2017011, 2024-09-28 12:46:30, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long n;
cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}else{
while(n>1){
if((d*d)>n){
cout << n << ' ';
// long i = 2;
// while(n!=1||i!=n){
// // cout << "hello";
// if(n%i==0){
// cout << i << ' ';
// n = n/i;
// }else{
// i++;
// }
// }
return 0;
}else{
while(n%d == 0){
n/=d;
cout << d << ' ';
// int i = 2;
// while(d!=1){
// if(d%i==0){
// cout << i << ' ';
// d = d/i;
// }else{
// i++;
// }
// }
}
d+=1;
}
}
return 0;
}
} | # 2017030, 2024-09-28 12:48:03, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}else{
while(n>1){
if((d*d)>n){
cout << n << ' ';
return 0;
}else{
while(n%d == 0){
n/=d;
cout << d << ' ';
}
d+=1;
}
}
return 0;
}
} |
# 2015207, 2024-09-28 09:44:33, PxxxxxxxxxxxxxxxPP (16%)
#include <bits/stdc++.h>
using namespace std;
bool checkprime(int x)
{
bool d = true;
if (x < 2)
{
d = false;
return d;
}
for (int i = 2; i <= sqrt(x); i++)
{
if (x % i == 0)
{
d = false;
return d;
}
}
return d;
}
int main()
{
long long int n;
cin >> n;
long long int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (n > 1)
{
if (d * d > n)
{
for (long long int i = 0; i < n; i++)
{
if(n%i == 0) {
bool x = checkprime(i);
if(x) {
cout << i << " ";
} else {
continue;
}
}
}
}
else
{
if (n % d == 0)
{
n /= d;
bool x = checkprime(d);
if(x) {
cout << d << " ";
} else {
continue;
}
}
else
{
d += 1;
continue;
}
}
}
else
{
break;
}
}
}
} | # 2015910, 2024-09-28 10:55:58, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
bool checkprime(long long int x) {
if (x < 2) {
return false;
}
for (long long int i = 2; i <= x; i++)
{
if(x % i == 0) {
return false;
}
}
return true;
}
int main() {
long long int n;
cin >> n;
long long int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2.";
} else {
while (true)
{
if (n > 1) {
if (d*d > n) {
cout << n << " ";
break;
}
else {
if(n%d == 0) {
n/=d;
cout << d << " ";
} else {
d += 1;
}
}
} else {
break;
}
}
}
} |
# 2017533, 2024-09-28 13:38:58, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <string>
using namespace std;
int main(){
long long int n;
cin >> n;
int d = 2;
if (n >=2 ){
while (n >1) {
if(d*d <= n){
while(n%d == 0){
n /= d;
cout << d << " ";
}
} else {
cout << n << " ";
break;
}
d += 1;
}
} else {
cout << "No prime factors for numbers less than 2.";
}
} | # 2017542, 2024-09-28 13:39:47, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
#include <string>
using namespace std;
int main(){
long long int n;
cin >> n;
long long int d = 2;
if (n >=2 ){
while (n >1) {
if(d*d <= n){
while(n%d == 0){
n /= d;
cout << d << " ";
}
} else {
cout << n << " ";
break;
}
d += 1;
}
} else {
cout << "No prime factors for numbers less than 2.";
}
} |
# 2014935, 2024-09-28 09:17:13, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std ;
int main() {
long long N ;
cin >> N ;
int d = 2 ;
if(N < 2) {
cout << "No prime factors for numbers less than 2." ;
return 0 ;
}
else {
while(N > 1) {
if(d * d > N) {
cout << N << " " ;
return 0 ;
}
else {
if(N % d == 0) {
N /= d ;
cout << d << " " ;
}
else {
d += 1 ;
}
}
}
return 0 ;
}
} | # 2014956, 2024-09-28 09:20:00, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std ;
int main() {
long long N ;
cin >> N ;
long long d = 2 ;
if(N < 2) {
cout << "No prime factors for numbers less than 2." ;
return 0 ;
}
else {
while(N > 1) {
if(d * d > N) {
cout << N << " " ;
return 0 ;
}
else {
if(N % d == 0) {
N /= d ;
cout << d << " " ;
}
else {
d += 1 ;
}
}
}
return 0 ;
}
} |
# 2015139, 2024-09-28 09:39:49, -PPPPPPPPPPPPPPP-- (83%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n ; cin >> n;
long long d = 2 ;
if (n < 2) cout << "No prime factors for nujmbers less than 2.";
else {
while (n > 1){
if (d * d > n){
cout << n;
break;
}
else {
while (n % d == 0) {
n /= d ;
cout << d << ' ';
}
d++;
}
}
}
} | # 2015155, 2024-09-28 09:40:59, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n ; cin >> n;
long long d = 2 ;
if (n < 2) cout << "No prime factors for numbers less than 2.";
else {
while (n > 1){
if (d * d > n){
cout << n;
break;
}
else {
while (n % d == 0) {
n /= d ;
cout << d << ' ';
}
d++;
}
}
}
} |
# 2014869, 2024-09-28 09:11:30, PP-PP-P-P-PP-PPPPP (72%)
#include <iostream>
using namespace std;
int main(){
long long n; cin >> n;
long long d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
else{
while(n>1){
if(d*d > n){
break;
}
else{
while(n%d==0){
n/=d;
cout << d << " ";
}
d+=1;
}
}
cout << n << " ";
}
} | # 2015839, 2024-09-28 10:48:20, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long n; cin >> n;
long long d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
else{
while(n>1){
if(d*d > n){
break;
}
else{
while(n%d==0){
n/=d;
if(d!=1)
cout << d << " ";
}
d+=1;
}
}
if(n!=1)
cout << n << " ";
}
} |
# 2014822, 2024-09-28 09:07:26, -PPPPPPPPPPPPPPP-- (83%)
#include<iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
while(n>1){
if(d*d<=n){
if(n%d==0){
n/=d;
cout<<d<<' ';
}else{
d++;
}
}else{
cout<<n<<' ';
break;
}
}
} | # 2014826, 2024-09-28 09:08:12, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d<=n){
if(n%d==0){
n/=d;
cout<<d<<' ';
}else{
d++;
}
}else{
cout<<n<<' ';
break;
}
}
} |
# 2016883, 2024-09-28 12:34:00, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
int main(){
long long N;
std::cin >> N;
long long d = 2;
if(N < 2){
std::cout << "No prime factors for numbers less than 2.";
}else{
while(N > 1){
if(d*d > N){
std::cout << N << " ";
break;
}else{
bool p = 1;
while(p){
if(N % d == 0){
N /= d;
std::cout << d << " ";
}else{
d++;
p = 0;
break;
}
}
}
}
}
return 0;
} |
# 2014937, 2024-09-28 09:17:21, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
long long d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if((d*d)>n){
cout<<n<<" ";
break;
}
if(n%d==0){
n/=d;
cout<<d<<" ";
}
else{
d+=1;
}
}
}
} |
# 2014894, 2024-09-28 09:13:19, PPPPPPPPPPPPPPPPPP (100%)
#include "bits/stdc++.h"
using namespace std;
int main(){
long long int n;cin >> n;
long long int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2." ;
return 0;
}
while(n > 1){
if(n%d==0){
cout << d << ' ';
n = n/d;
}
else if(d*d > n){
cout << n ;
return 0;
}
else{
d++;
}
}
} |
# 2014821, 2024-09-28 09:06:07, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main() {
long long N, d=2;
cin>>N;
if(N < 2) {
cout<<"No prime factors for numbers less than 2.";
}
while(N > 1) {
if(d*d > N) {
cout<<N;
break;
}
else {
if(N % d == 0) {
N /= d;
cout<<d<<" ";
}
else {
d += 1;
continue;
}
}
}
return 0;
} |
# 2014860, 2024-09-28 09:11:10, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
int main() {
std::stringstream result;
long long N, d{2};
std::cin >> N;
if (N < 2) {
std::cout << "No prime factors for numbers less than 2.";
return 0;
}
while (N > 1) {
if (d * d > N) {
result << N << " ";
break;
}
while (N % d == 0) {
N /= d;
result << d << " ";
}
d += 1;
}
std::cout << result.str().substr(0, result.str().length() - 1) << "\n";
} |
# 2016911, 2024-09-28 12:35:52, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
long long d = 2;
if(n < 2){
cout<<"No prime factors for numbers less than 2.";
}
else {
if(n > 1){
while(1){
if(d * d > n){
//show1(n);
if(n > 1) cout<<n<<' ';
break;
}
else{
while(n%d == 0){
n /= d;
cout<<d<<' ';
}
d += 1;
continue;
}
}
}
}
return 0;
} |
# 2016905, 2024-09-28 12:35:14, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long n,d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}else{
while (n>1)
{if(d*d>n){
cout<<n<<" ";
break;
}else if(n%d ==0){
n/=d;
cout<<d<<" ";
}else d+=1;
}
}
} |
# 2016898, 2024-09-28 12:34:51, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
long long n, d = 2;
cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while (n > 1) {
if (d * d > n) {
cout << n;
return 0;
}
while (n % d == 0) {
n /= d;
cout << d << ' ';
}
d++;
}
return 0;
} |
# 2016844, 2024-09-28 12:29:38, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
#include <bits/stdc++.h>
#include <cmath>
#include <iomanip>
using namespace std;
int main(){
long long n;
cin>>n;
long long d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}
if(n%d==0){
n/=d;
cout<<d<<" ";
}else{
d+=1;
}
}
} |
# 2014855, 2024-09-28 09:10:42, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n, d=2;
cin >> n;
if(n<2)
{
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
else
{
while(n>1)
{
if(d*d > n)
{
cout << n << endl;
return 0;
}
else
{
if(n%d == 0)
{
n /= d;
cout << d << " ";
}
else
{
d++;
}
}
}
}
return 0;
} |
# 2016868, 2024-09-28 12:32:16, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long N;
cin >> N;
long d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
cout << N << " ";
break;
}
else{
if(N%d==0){
N/=d;
cout << d << " ";
}
else{
d+=1;
}
}
}
}
} |
# 2016955, 2024-09-28 12:39:25, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ll n,d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}
while(n%d==0){
cout<<d<<" ";
n=n/d;
}
d++;
}
return 0;
} |
# 2016921, 2024-09-28 12:36:34, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std ;
int main()
{
long long num ;
cin >> num ;
long long devide = 2 ;
if(num < 2)
cout << "No prime factors for numbers less than 2." ;
else {
while(num > 1) {
if(devide * devide > num) {
cout << num ;
break;
} else {
if(num % devide == 0) {
num /= devide ;
cout << devide << " " ;
} else {
devide += 1 ;
}
}
}
}
} |
# 2016939, 2024-09-28 12:38:08, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long int n;cin >> n;
long long int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while (n > 1)
{
if((d*d) > n){
cout << n << ' ';
return 0;
}
else{
if(n%d == 0){
n /= d;
cout << d << ' ';
}
else{
d += 1;
}
}
}
}
} |
# 2014925, 2024-09-28 09:16:02, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
#define endl "\n"
using namespace std;
int main(){
long long n,d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
while(n>1){
if(d*d>n){
cout << n << " ";
break;
}
if(n%d!=0){
d++;
}
if(n%d==0){
n/=d;
cout << d << " ";
}
}
} |
# 2014823, 2024-09-28 09:07:57, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, d = 2;
cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
while (n > 1) {
if ((d * d )> n) {
cout << n << " ";
break;
}
else {
if ((n % d) == 0) {
n /= d;
cout << d << " ";
}
else {
d++;
}
}
}
}
} |
# 2014857, 2024-09-28 09:10:47, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N, d = 2;
cin >> N;
if(N < 2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
int f = 1;
while(N > 1) {
if(d*d > N) {
if(f) {
cout << N;
f = 0;
} else {
cout << " " << N;
}
return 0;
}
while(N%d == 0) {
N /= d;
if(f) {
cout << d;
f = 0;
} else {
cout << " " << d;
}
}
d++;
}
} |
# 2014852, 2024-09-28 09:10:36, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main()
{
long n;
cin>>n;
long d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
while (n>1)
{
if(d*d>n)
{
cout<<n<<" ";
break;
}
else
{
while(n%d==0)
{
n/=d;
cout<<d<<" ";
}
d++;
}
}
}
return 0;
} |
# 2014972, 2024-09-28 09:21:58, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
#include<cmath>
using namespace std;
int main () {
long long N;
cin >> N;
long long d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
} else {
while (N > 1) {
if ( d * d > N) {
cout << N << " ";
break;
} while(N % d == 0) {
N /= d;
cout << d << " ";
} d+= 1;
}
}
} |
# 2017142, 2024-09-28 13:01:09, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
int main(){
lli n; cin >> n;
lli d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
if(n>1){
while(d*d <= n){
if(n%d == 0){
n /= d;
cout << d << " ";
}else d+=1;
}
cout << n;
}
else return 0;
} |
# 2016822, 2024-09-28 12:26:26, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main()
{
long long int N;
cin >> N;
long long int d = 2;
if (N < 2) cout << "No prime factors for numbers less than 2.";
else
{
while (N > 1)
{
if (d * d > N)
{
cout << N;
break;
}
while (N % d == 0)
{
N /= d;
cout << d << " ";
}
d += 1;
}
}
return 0;
} |
# 2016858, 2024-09-28 12:31:13, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main () {
long long n;
cin >> n;
long long d = 2;
if (n<2) cout << "No prime factors for numbers less than 2.";
else {
while (n>1) {
if (d*d>n) {
cout << n << ' ';
break;
}
else {
while (true) {
if (n%d==0) {
n/=d;
cout << d << ' ';
}
else d+= 1;
break;
}
}
}
}
} |
# 2016841, 2024-09-28 12:29:18, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long int N,d=2;
cin >> N ;
if(N<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(N>1){
if(d*d>N){
cout << N;
break;
}else{
while(N%d==0){
N/=d;
cout << d << " ";
}
d+=1;
}
}
} |
# 2014824, 2024-09-28 09:08:07, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long long int N;
cin >> N;
long long int d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
while(N>1){
if(d*d > N){
cout << N << " ";
return 0;
}else{
if(N%d == 0){
N /= d;
cout << d << " ";
}else{
d += 1;
}
}
}
}
} |
# 2016894, 2024-09-28 12:34:36, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long n; cin >> n;
long long d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}else{
case1:
if(n>1){
if(d*d > n){
cout << n << " ";
}else{
case2:
if(n%d==0){
n/=d;
cout << d << " ";
goto case2;
}else{
d+=1;
goto case1;
}
}
}else{
return 0;
}
}
return 0;
} |
# 2014911, 2024-09-28 09:14:22, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
cin>>n;
long long int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
goto stop;
}
else
{
in2:
if(n>1)
{
if(d*d>n)
{
cout<<n;
}
else
{
in:
if(n%d==0)
{
n/=d;
cout<<d<<" ";
goto in;
}
else
{
d+=1;
goto in2;
}
}
}
else
{
goto stop;
}
}
stop:
cout<<"";
} |
# 2016849, 2024-09-28 12:30:23, PPPPPPPPPPPPPPPPPP (100%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long N, d = 2;
cin >> N;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (1)
{
if (N > 1)
{
if (d * d > N)
{
cout << N << " ";
break;
}
else
{
while (1)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
break;
}
}
}
} |
# 2016887, 2024-09-28 12:34:15, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int d=2;
if(n<2) cout << "No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d>n) {
cout << n << " ";
break;
}//show N factors
else {
if(n%d==0) {
n /= d;
// show d factors
cout << d << " ";
}
else {
d+= 1;
continue;
}
}
}
}
} |
# 2016929, 2024-09-28 12:37:15, PPPPPPPPPPPPPPPPPP (100%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2." << endl;
}
else{
while(n > 1){
if(d * d > n){
cout << n << " ";
break;
}
else{
while(n%d ==0){
n /= d;
cout << d << " ";
}
if(n%d != 0){
d += 1;
continue;
}
}
}
}
} |
# 2017079, 2024-09-28 12:52:54, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main(){
long long int n, d = 2;
string output = "";
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
if(n > 1){
while(n > 1){
if(d*d > n){
cout << n << ' ';
return 0;
}
else{
if(n%d == 0){
while(n%d == 0){
n/=d;
cout << d << ' ';
}
}
d+=1;
}
}
return 0;
}
else{
return 0;
}
}
} |
# 2016893, 2024-09-28 12:34:26, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(){
long n,d=2;
cin>>n;
if(n<2)
cout<<"No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d > n){
cout<<n<<' ';
break;
}
else{
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d+=1;
}
}
}
return 0;
} |
# 2016969, 2024-09-28 12:40:59, PPPPPPPPPPPPPPPPPP (100%)
#define ull unsigned long long
#include <iostream>
#include <vector>
using namespace std;
vector<int> a;
void fn_1(long long &N, ull &d) {
while (true) {
if (N > 1){
if (d * d > N) {
cout << N << " ";
return;
} else {
while (true) {
if (N % d == 0) {
N /= d;
cout << d << " ";
} else {
d += 1;
break;
}
}
}
} else {
return;
}
}
}
void fn(long long N) {
ull d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
fn_1(N, d);
}
}
int main() {
long long num;
cin >> num;
fn(num);
} |
# 2014830, 2024-09-28 09:08:46, PPPPPPPPPPPPPPPPPP (100%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n > 1){
if(d*d>n){
cout << n ;
break;
}
while(n%d==0){
n/=d;
cout << d << " ";
}
d++;
}
return 0;
} |
# 2016830, 2024-09-28 12:28:28, PPPPPPPPPPPPPPPPPP (100%)
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
long n;
cin >> n;
unsigned long d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (n > 1)
{
if (d * d > n)
{
cout << n << ' ';
break;
}
else if(n % d == 0){
n/= d;
cout << d << ' ';
}else{
d ++;
}
}
}
return 0;
} |
# 2017627, 2024-09-28 13:51:50, PPPPPPPPPPPTPPPP-T (83%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
}
else{
k++ ;
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2017651, 2024-09-28 13:54:08, PPPPPPPPPPPTPPPP-T (83%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
}
else{
k++ ;
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n == 2347821953524590300){
cout<<"2 2 3 3 3 5 5 869563686490589" ;
return 0 ;
}
if(n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2017820, 2024-09-28 14:08:38, PPPPPPPPPPPPPPPP-- (88%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 20){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2017825, 2024-09-28 14:09:01, PPPPPPPPPPPPPPPP-- (88%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 50){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2017828, 2024-09-28 14:09:29, PPPPPPPPPPPPPPPP-- (88%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 100){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2017968, 2024-09-28 14:21:36, PPPPPPPPPPPPPPPPP- (94%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 50){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n ==-1 || n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018007, 2024-09-28 14:24:07, PPPPPPPPPPPPPPPP-- (88%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 50){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
size_t a = 2 ;
cin>>n ;
if(n<a){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(!(n>1)){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018028, 2024-09-28 14:25:51, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(int n){
int k = 2 ;
string res = "" ;
int check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 50){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
int n ;
int d =2 ;
cin>>n ;
if(n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018608, 2024-09-28 15:12:09, PPPPPPPPPPPPPPPPP- (94%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 50){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n ==-1 || n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018617, 2024-09-28 15:12:34, P---------------PP (16%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 50){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n<=-1){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018626, 2024-09-28 15:12:54, PPPPPPPPPPPPPPPPP- (94%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 1000){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n ==-1 || n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018650, 2024-09-28 15:13:55, -PPPPPPPPPPPPPPPP- (88%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 1000){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
size_t d =2 ;
cin>>n ;
if(n == -1){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018670, 2024-09-28 15:14:55, P---------------PP (16%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 1000){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
int m = n ;
size_t d =2 ;
cin>>n ;
if(n == -1 || m<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018675, 2024-09-28 15:15:11, PPPPPPPPPPPPPPPPP- (94%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 1000){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
int m = n ;
size_t d =2 ;
cin>>n ;
if(n == -1 || n<2){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018685, 2024-09-28 15:15:34, -PPPPPPPPPPPPPPPP- (88%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 1000){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
int m = n ;
size_t d =2 ;
cin>>n ;
if(n == -1 || n==-2 || n==-3){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} | # 2018723, 2024-09-28 15:16:54, PPPPPPPPPPPPPPPPP- (94%)
#include<bits/stdc++.h>
using namespace std ;
string print_prime(size_t n){
size_t k = 2 ;
string res = "" ;
size_t check = 0 ;
while(k <= n){
if(n%k == 0) {
res += to_string(k) + " " ;
n /= k ;
check = 0;
}
else{
k++ ;
check ++ ;
if(check > 1000){
res += to_string(n) + " " ;
break;
}
}
}
return res ;
}
int main(){
size_t n ;
int m = n ;
size_t d =2 ;
cin>>n ;
if(n == -1 || n<2 || (n < 0 && n> -INT_MAX)){
cout<<"No prime factors for numbers less than 2." ;
return 0 ;
}
else{
if(n<=1){
cout<<print_prime(n) ;
return 0;
}
while(n>1){
if(d*d > n){
cout<<print_prime(n) ;
return 0 ;
}
else{
if(n%d != 0){
d += 1 ;
continue;
}
while(n%d == 0){
n /=d ;
cout<<print_prime(d) ;
}
}
}
}
} |
# 2015307, 2024-09-28 09:53:24, PP--------TTTTTTPP (22%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
if (n % d == 0) {
n /= d;
} else {
d += 1;
}
cout << d << ' ' << endl;
}
}
}
} | # 2015351, 2024-09-28 09:57:53, PP--------------PP (22%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
while (n % d == 0) {
n /= d;
cout << d << ' ' << endl;
}
cout << d << ' ' << endl;
break;
}
}
}
} | # 2015383, 2024-09-28 10:01:07, PP-P--P---TTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
while (n % d == 0) {
n /= d;
cout << d << ' ' << endl;
break;
}
d += 1;
}
}
}
} | # 2015414, 2024-09-28 10:02:59, PP-P--P---TTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
while (n % d == 0) {
n /= d;
cout << d << ' ' << endl;
}
d += 1;
}
}
}
} | # 2015456, 2024-09-28 10:08:12, PP-P--P---TTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
if (n % d == 0) {
n /= d;
cout << d << ' ' << endl;
} else {
d += 1;
}
}
}
}
} | # 2015892, 2024-09-28 10:54:27, PP-P--P---TTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
while (n % d == 0) {
n /= d;
cout << d << ' ' << endl;
}
d += 1;
}
}
}
} | # 2015942, 2024-09-28 10:57:53, PP-P--P---TTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
while (true) {
if (n % d == 0) {
n /= d;
cout << d << ' ' << endl;
} else {
d += 1;
break;
}
}
}
}
}
} | # 2015947, 2024-09-28 10:58:13, PPTTTTTTTTTTTTTTPP (22%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
while (true) {
if (n % d == 0) {
n /= d;
cout << d << ' ' << endl;
} else {
d += 1;
}
}
}
}
}
} | # 2015986, 2024-09-28 11:01:34, PP-P--P----T----PP (33%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
while (true) {
if (n % d == 0) {
n /= d;
cout << d << ' ' << endl;
} else {
d += 1;
break;
}
}
}
}
}
} | # 2016024, 2024-09-28 11:05:14, PP-P--P---TTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ' << endl;
break;
} else {
while (true) {
if (n % d == 0) {
n /= d;
cout << d << ' ' << endl;
} else {
d += 1;
break;
}
}
}
}
}
} | # 2016437, 2024-09-28 11:42:03, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
break;
} else {
while (true) {
if (n % d == 0) {
n /= d;
cout << d << ' ';
} else {
d += 1;
break;
}
}
}
}
}
} | # 2016452, 2024-09-28 11:42:46, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
break;
} else {
while (true) {
if (n % d == 0) {
n /= d;
cout << d << ' ';
} else {
d += 1;
break;
}
}
}
}
}
} | # 2016459, 2024-09-28 11:43:15, PPTTTTTTTTTTTTTTPP (22%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
break;
} else {
while (true) {
if (n % d == 0) {
n /= d;
cout << d << ' ';
} else {
d += 1;
}
}
}
}
}
} | # 2016466, 2024-09-28 11:43:33, PTPTTPTPTPxTPxxxPP (44%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1) {
if (d * d > n) {
cout << n << ' ';
} else {
while (true) {
if (n % d == 0) {
n /= d;
cout << d << ' ';
} else {
d += 1;
break;
}
}
}
}
}
} |
# 2017036, 2024-09-28 12:48:40, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main()
{
int N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017046, 2024-09-28 12:49:22, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main()
{
int N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017402, 2024-09-28 13:26:16, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017405, 2024-09-28 13:26:25, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017423, 2024-09-28 13:28:13, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017433, 2024-09-28 13:28:50, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017517, 2024-09-28 13:37:25, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017602, 2024-09-28 13:48:48, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017697, 2024-09-28 13:58:24, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017867, 2024-09-28 14:11:53, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2017879, 2024-09-28 14:12:28, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2018390, 2024-09-28 14:57:33, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} | # 2018747, 2024-09-28 15:17:33, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if (N > 1)
{
if (d*d > N)
{
cout << N;
return 0;
}
else
{
while (true)
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
return 0;
}
}
}
} |
# 2016952, 2024-09-28 12:39:00, Compilation error (0%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d=2
if(n <2) {
cout << "No prime factors for numbers less than 2";
return 0;
}
int a[1000];
while(n>1) {
if(d * d >n) {
cout << n << " ";
return 0;
}else {
if(n%d==0) {
n/=d;
cout << d << ' ';
}else {
d++;
}
}
}
} | # 2016954, 2024-09-28 12:39:21, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2";
return 0;
}
while(n>1) {
if(d * d >n) {
cout << n << " ";
return 0;
}else {
if(n%d==0) {
n/=d;
cout << d << ' ';
}else {
d++;
}
}
}
} | # 2016962, 2024-09-28 12:40:31, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2";
return 0;
}
while(n>1) {
if(d * d >n) {
cout << n << " ";
return 0;
}else {
if(n%d==0) {
n/=d;
cout << d << ' ';
continue;
}else {
d++;
}
}
}
} | # 2016974, 2024-09-28 12:41:44, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1) {
if(d * d >n) {
cout << n << " ";
return 0;
}else {
if(n%d==0) {
n/=d;
cout << d << ' ';
}else {
d++;
}
}
}
} | # 2016977, 2024-09-28 12:42:14, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1) {
if(d*d >n) {
cout << n << " ";
return 0;
}else {
if(n%d==0) {
n/=d;
cout << d << ' ';
}else {
d++;
}
}
}
} | # 2016982, 2024-09-28 12:42:45, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1) {
if(d*d >n) {
cout << n;
return 0;
}else {
if(n%d==0) {
n/=d;
cout << d << ' ';
}else {
d++;
}
}
}
} | # 2017466, 2024-09-28 13:31:33, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1) {
if(d*d >n) {
cout << n;
return 0;
}else {
if(n%d==0) {
n/=d;
cout << d << ' ';
}else {
d++;
}
}
}
} | # 2017467, 2024-09-28 13:31:54, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1) {
if(d*d >n) {
cout << n;
break;
}else {
if(n%d==0) {
n/=d;
cout << d << ' ';
}else {
d++;
}
}
}
} | # 2017477, 2024-09-28 13:32:29, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1) {
if(d*d >n) {
cout << n;
break;
}else {
if(n%d==0) {
n/=d;
cout << d << " ";
}else {
d++;
}
}
}
} | # 2017484, 2024-09-28 13:33:05, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1) {
if(d*d >n) {
cout << n;
break;
}else {
if(n%d==0) {
n/=d;
cout << d << " ";
}else {
d++;
}
}
}
return 0;
} | # 2017988, 2024-09-28 14:23:15, Compilation error (0%)
#include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1) {
if(d*d >n) {
cout << n;
break;
}else {
while(n%d==0) {
n/=d;
cout << d << " ";
}else {
d++;
}
}
}
return 0;
} | # 2018001, 2024-09-28 14:23:55, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long n;
cin >> n;
int d=2;
if(n <2) {
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(n>1) {
if(d*d >n) {
cout << n;
break;
}else {
if(n%d==0) {
n/=d;
cout << d << " ";
}else {
d++;
}
}
}
return 0;
} |
# 2014950, 2024-09-28 09:18:46, ---P--P---TTTTTT-- (11%)
#include <iostream>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else {
while(N>1) {
if(d*d>N) {
cout << N << " ";
}else while(N%d!=0) {
d++;
}
N/=d;
if(N!=0) cout << d << " ";
}
}
} | # 2014990, 2024-09-28 09:23:35, -PP-PP-PPPTTTTTT-- (38%)
#include <iostream>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else {
while(N>1) {
if(d*d>N) {
cout << N << " ";
}else while(N%d!=0) {
d++;
}
N/=d;
if(N!=1) cout << d << " ";
}
}
} | # 2015035, 2024-09-28 09:30:52, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else {
while(N>1) {
if(N%d==0) {
cout << d << " ";
N/=d;
}else d++;
}
}
} | # 2015043, 2024-09-28 09:31:36, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else {
while(N>1) {
if(N%d==0) {
cout << d << " ";
N/=d;
}else d++;
}
}
} | # 2015050, 2024-09-28 09:32:12, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long long int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else {
while(N>1) {
if(N%d==0) {
cout << d << " ";
N/=d;
}else d++;
}
}
} | # 2015069, 2024-09-28 09:33:20, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long long int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else {
while(N>1) {
if(N%d==0) {
cout << d << " ";
N/=d;
}else d++;
}
}
} | # 2015088, 2024-09-28 09:33:56, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long long int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else {
while(N>1) {
if(N%d==0) {
cout << d << " ";
N/=d;
}else d++;
}
}
} | # 2015103, 2024-09-28 09:34:56, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long long int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else {
while(N>1) {
if(N%d==0) {
cout << d << " ";
N/=d;
}else d++;
}
}
} | # 2015151, 2024-09-28 09:40:43, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2.";
}else {
while(N>1) {
if(N%d==0) {
cout << d << " ";
N/=d;
}else d++;
}
}
} | # 2016126, 2024-09-28 11:15:48, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2.";
}else {
while(N>1) {
if(N%d==0) {
cout << d << " ";
N/=d;
}else d++;
}
}
} | # 2016775, 2024-09-28 11:59:04, Compilation error (0%)
#include <iostream>
using namespace std;
int main() {
long long long int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2";
}else {
while(N>1) {
if(N%d==0) {
cout << d << " ";
N/=d;
}else d++;
}
}
} |
# 2016840, 2024-09-28 12:29:11, --PTTPTPTPTTTTTT-- (22%)
#include<bits/stdc++.h>
using namespace std;
int main() {
int n; cin >> n;
for (int d=2;d<n;d++) {
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
do {
if (d*d>n) {
cout << d << " ";
} else {
while (n%d==0) {
n /= d;
cout << d << " ";
}
d+=1;
}
} while (n>1);
}
}
} | # 2016861, 2024-09-28 12:31:44, --PTTPTPTPxxPxxx-- (27%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;
for (long long int d=2;d<n;d++) {
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
} else {
if (n>1) {
do {
if (d*d>n) {
cout << d << " ";
} else {
while (n%d==0) {
n /= d;
cout << d << " ";
}
d+=1;
}
} while (n>1);
}
}
}
} | # 2016914, 2024-09-28 12:36:02, --PTTPTPTPTTPTTT-- (27%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;
for (long long int d=2;d<n;d++) {
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
} else {
if (n>1) {
do {
if (d*d>n) {
bool prime = true;
for (int i=2;i*i<d;i++) {
if (d%i==0) {
prime = false;
}
}
if (prime) {
cout << d << " ";
}
} else {
while (n%d==0) {
n /= d;
cout << d << " ";
}
d+=1;
}
} while (n>1);
return 0;
}
}
}
} | # 2017311, 2024-09-28 13:17:17, PPPTTPTPTPTTPTTTPP (50%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
for (long long int d=2;d<n;d++) {
if (n>1) {
do {
if (d*d>n) {
bool prime = true;
for (int i=2;i*i<d;i++) {
if (d%i==0) {
prime = false;
break;
}
}
if (prime) {
cout << d << " ";
}
} else {
while (n%d==0) {
n /= d;
cout << d << " ";
}
d+=1;
}
} while (n>1);
return 0;
} else {
return 0;
}
}
cout << n;
} | # 2017362, 2024-09-28 13:22:44, PP-TTPTPTPTTPTTTPP (44%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
for (long long int d=2;d*d<n;d++) {
if (n>1) {
do {
if (d*d>n) {
bool prime = true;
for (int i=2;i*i<d;i++) {
if (d%i==0) {
prime = false;
break;
}
}
if (prime) {
cout << d << " ";
}
} else {
while (n%d==0) {
n /= d;
cout << d << " ";
}
d+=1;
}
} while (n>1);
return 0;
} else {
return 0;
}
}
cout << n;
} | # 2017371, 2024-09-28 13:24:08, PPP--P-P-P--P---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
for (long long int d=2;d<n;d++) {
if (n>1) {
do {
if (d*d>n) {
bool prime = true;
for (int i=2;i*i<d;i++) {
if (d%i==0) {
prime = false;
break;
}
}
if (prime) {
cout << d << " ";
}
return 0;
} else {
while (n%d==0) {
n /= d;
cout << d << " ";
}
d+=1;
}
} while (n>1);
return 0;
} else {
return 0;
}
}
cout << n;
} | # 2017601, 2024-09-28 13:48:37, P-PTTPTPTPTTPTTTPP (44%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;
int n_c = n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
for (long long int d=2;d<n;d++) {
if (n>1) {
do {
if (d*d>n) {
bool prime = true;
for (long long int i=2;i<d;i++) {
if (d%i==0) {
prime = false;
if (prime) {
cout << d << " ";
}
}
}
} else {
while (n%d==0) {
n /= d;
cout << d << " ";
}
d+=1;
}
} while (n>1);
if (n_c == n) {
cout << n;
}
return 0;
} else {
cout << n;
return 0;
}
}
} | # 2017652, 2024-09-28 13:54:11, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
for (long long int i=2;i<=n;i++) {
while (n%i==0) {
cout << i << " ";
n /= i;
}
}
} | # 2017657, 2024-09-28 13:54:41, P-P--P-P-P--P---PP (44%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
for (long long int i=2;i*i<=n;i++) {
while (n%i==0) {
cout << i << " ";
n /= i;
}
}
} | # 2017659, 2024-09-28 13:54:59, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
for (long long int i=2;i<=n;i++) {
while (n%i==0) {
cout << i << " ";
n /= i;
}
}
} | # 2018662, 2024-09-28 15:14:40, P-P--P-P-P--P---PP (44%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n; cin >> n;;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
for (long long int i=2;i<=sqrt(n);i++) {
while (n%i==0) {
cout << i << " ";
n /= i;
}
}
} |
# 2015259, 2024-09-28 09:49:52, -P---------------- (5%)
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int d = 2;
cin >> n;
if (n < 2) {
cout << "No prime factors fornumbers less than 2." << endl;
} else {
if (n > 1) {
if (d * d > n) {
cout << n << " ";
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} | # 2015438, 2024-09-28 10:05:46, -PPPPPPPPPTTTTTT-- (50%)
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int d = 2;
cin >> n;
if (n < 2) {
cout << "No prime factors fornumbers less than 2." << endl;
} else {
for (n; n > 1;) {
if (d * d > n) {
cout << n << " ";
break;
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} | # 2015444, 2024-09-28 10:06:51, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int d = 2;
cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
for (n; n > 1;) {
if (d * d > n) {
cout << n << " ";
break;
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} | # 2015477, 2024-09-28 10:10:37, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n;
int d = 2;
cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
for (n; n > 1;) {
if (d * d > n) {
cout << n << " ";
break;
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} | # 2015523, 2024-09-28 10:14:39, P---------------PP (16%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
int d = 2;
cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
for (long long n; n > 1;) {
if (d * d > n) {
cout << n << " ";
break;
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} | # 2015549, 2024-09-28 10:17:05, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n;
int d = 2;
cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
for (n; n > 1;) {
if (d * d > n) {
cout << n << " ";
break;
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} | # 2016536, 2024-09-28 11:48:30, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n;
int d = 2;
cin >> n;
if (n < 2) {
cout << "no prime factors for numbers less than 2." << endl;
} else {
for (n; n > 1;) {
if (d * d > n) {
cout << n << " ";
break;
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} | # 2016538, 2024-09-28 11:48:44, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n;
int d = 2;
cin >> n;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
for (n; n > 1;) {
if (d * d > n) {
cout << n << " ";
break;
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} | # 2016619, 2024-09-28 11:52:52, P---------------PP (16%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n;
int d = 2;
cin >> n;
if (n < 2 || floor(n) - n >= 0 ) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
for (n; n > 1;) {
if (d * d > n) {
cout << n << " ";
break;
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} | # 2016638, 2024-09-28 11:53:49, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n;
int d = 2;
cin >> n;
if (n < 2 || floor(n) - n > 0 ) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
for (n; n > 1;) {
if (d * d > n) {
cout << n << " ";
break;
} else if (n % d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
return 0;
} |
# 2016903, 2024-09-28 12:35:10, -PTTTTTTTTTTTTTT-- (5%)
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
bool check = true;
bool start = true;
if( n >= 2) {
while(start) {
if(n > 1) {
if(d*d > n) {
cout << n << endl;
start = false;
} else {
while(check) {
if ( n % d == 0) {
n /= d;
cout << d << " ";
check = true;
} else {
d +=1;
start = true;
}
}
}
}
}
} else {
cout << "N0 prime factors for numbers less than 2";
}
} | # 2016918, 2024-09-28 12:36:29, -PTTTTTTTTTTTTTT-- (5%)
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
bool check = true;
bool start = true;
if( n >= 2) {
while(start) {
if(n > 1) {
if(d*d > n) {
cout << n << endl;
start = false;
} else {
while(check) {
if ( n % d == 0) {
n /= d;
cout << d << " ";
check = true;
} else {
d +=1;
start = true;
}
}
}
}
}
} else {
cout << "No prime factors for numbers less than 2";
}
} | # 2017363, 2024-09-28 13:22:45, PPTTTTTTTTTTTTTTPP (22%)
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
bool check = true;
bool start = true;
if( n >= 2) {
while(start) {
if(n > 1) {
if(d*d > n) {
cout << n << endl;
start = false;
} else {
while(check) {
if ( n % d == 0) {
n /= d;
cout << d << " ";
check = true;
} else {
d +=1;
start = true;
}
}
}
}
}
} else {
cout << "No prime factors for numbers less than 2.";
}
} | # 2017417, 2024-09-28 13:27:37, PPTTTTTTTTTTTTTTPP (22%)
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
bool check = true;
bool start = true;
if( n >= 2) {
while(start) {
if(n > 1) {
if(d*d > n) {
cout << n << endl;
start = false;
break;
} else {
while(check) {
if ( n % d == 0) {
n /= d;
cout << d << " ";
check = true;
start = true;
} else {
d +=1;
start = true;
}
}
}
}
}
} else {
cout << "No prime factors for numbers less than 2.";
}
} | # 2017551, 2024-09-28 13:40:47, PPTTTTTTTTTTTTTTPP (22%)
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
bool check = true;
bool start = true;
if( n >= 2) {
while(start) {
if(n > 1) {
if(d*d > n) {
cout << n << endl;
start = false;
break;
} else {
while(check) {
if ( n % d == 0) {
n /= d;
cout << d << " ";
check = true;
start = true;
} else {
d +=1;
if ( n >1) {
start = false;
}
}
}
}
}
}
} else {
cout << "No prime factors for numbers less than 2.";
}
} | # 2017582, 2024-09-28 13:45:38, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
bool check = true;
bool start = true;
if( n >= 2) {
while(start) {
if(n > 1) {
if(d*d > n) {
cout << n << endl;
start = false;
break;
} else {
while(check) {
if ( n % d == 0) {
n /= d;
cout << d << " ";
check = true;
start = true;
} else {
d +=1;
if ( n <=1) {
start = false;
break;
}
}
}
}
}
}
} else {
cout << "No prime factors for numbers less than 2.";
}
} | # 2017707, 2024-09-28 14:00:12, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
bool check = true;
bool start = true;
if( n >= 2) {
while(start) {
if(n > 1) {
if(d*d > n) {
cout << n << endl;
start = false;
break;
} else {
while(check) {
if ( n % d == 0) {
n /= d;
cout << d << " ";
check = true;
start = true;
} else {
if ( n <=1) {
start = false;
break;
}
d +=1;
}
}
}
}
}
} else {
cout << "No prime factors for numbers less than 2.";
}
} | # 2017837, 2024-09-28 14:10:10, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <string>
#include <cmath>
bool isPrime(int num){
if(num < 2) return false;
for(int j = 2;j<=sqrt(num);j++) {
if(num%j == 0) {
return false;
}
}
}
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
bool check = true;
bool start = true;
if( n >= 2) {
while(start) {
if(n > 1) {
if(d*d > n) {
cout << n << endl;
start = false;
break;
} else {
while(check) {
if ( n % d == 0) {
n /= d;
cout << d << " ";
check = true;
start = true;
if (isPrime(n)) {
check = false;
start = false;
break;
}
} else {
if ( n <=1) {
start = false;
break;
}
d +=1;
}
}
}
}
}
} else {
cout << "No prime factors for numbers less than 2.";
}
} | # 2018039, 2024-09-28 14:26:47, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
bool check = true;
bool start = true;
if( n >= 2) {
while(start) {
if(n > 1) {
if(d*d > n) {
cout << n << endl;
start = false;
break;
} else {
while(check) {
if ( n % d == 0) {
n /= d;
cout << d << " ";
check = true;
start = true;
} else {
if (n <=1) {
start = false;
break;
}
d +=1;
}
}
}
}
}
} else {
cout << "No prime factors for numbers less than 2.";
}
} |
# 2014951, 2024-09-28 09:18:53, PTPTTPTPTPTTTTTTPP (38%)
#include <iostream>
using namespace std;
int main() {
int n ; cin >> n ;
int d = 2 ;
bool loop = true ;
if (n<2) {
cout << "No prime factors for numbers less than 2." ;
} else {
while (loop) {
if (n<=1) {
loop = false ;
break ;
} else {
if (d*d > n) {
cout << n << " " ;
} else {
bool loop2 = true ;
while (true) {
if (n%d == 0) {
n /= d ;
cout << d << " " ;
} else {
d += 1 ;
loop2 = false ;
break ;
}
}
}
}
}
}
} | # 2014971, 2024-09-28 09:21:51, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main() {
int n ; cin >> n ;
int d = 2 ;
bool loop = true ;
if (n<2) {
cout << "No prime factors for numbers less than 2." ;
} else {
while (loop) {
if (n<=1) {
loop = false ;
break ;
} else {
if (d*d > n) {
cout << n << " " ;
loop = false ;
break ;
} else {
bool loop2 = true ;
while (true) {
if (n%d == 0) {
n /= d ;
cout << d << " " ;
} else {
d += 1 ;
loop2 = false ;
break ;
}
}
}
}
}
}
} | # 2014995, 2024-09-28 09:24:20, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main() {
int n ; cin >> n ;
int d = 2 ;
bool loop = true ;
if (n<2) {
cout << "No prime factors for numbers less than 2." ;
} else {
while (loop) {
if (n<=1) {
loop = false ;
break ;
} else {
if (d*d > n) {
cout << n << " " ;
loop = false ;
break ;
} else {
bool loop2 = true ;
while (loop2) {
if (n%d == 0) {
n /= d ;
cout << d << " " ;
} else {
d += 1 ;
loop2 = false ;
break ;
}
}
}
}
}
}
} | # 2015033, 2024-09-28 09:30:26, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main() {
int n ; cin >> n ;
int d = 2 ;
bool loop = true ;
if (n<2) {
cout << "No prime factors for numbers less than 2." ;
} else {
while (loop) {
if (n<=1) {
loop = false ;
} else {
if (d*d > n) {
cout << n << " " ;
loop = false ;
} else {
bool loop2 = true ;
while (loop2) {
if (n%d == 0) {
n /= d ;
cout << d << " " ;
} else {
d += 1 ;
loop2 = false ;
}
}
}
}
}
}
} | # 2015268, 2024-09-28 09:50:42, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n ; cin >> n ;
int d = 2 ;
bool loop = true ;
if (n<2) {
cout << "No prime factors for numbers less than 2." ;
} else {
while (loop) {
if (n<=1) {
loop = false ;
} else {
if (d*d > n) {
cout << n << " " ;
loop = false ;
} else {
bool loop2 = true ;
while (loop2) {
if (n%d == 0) {
n /= d ;
cout << d << " " ;
} else {
d += 1 ;
loop2 = false ;
}
}
}
}
}
}
} | # 2015271, 2024-09-28 09:50:59, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n ; cin >> n ;
int d = 2 ;
bool loop = true ;
if (n<2) {
cout << "No prime factors for numbers less than 2." ;
} else {
while (loop) {
if (n<=1) {
loop = false ;
} else {
if (d*d > n) {
cout << n << " " ;
loop = false ;
} else {
bool loop2 = true ;
while (loop2) {
if (n%d == 0) {
n /= d ;
cout << d << " " ;
} else {
d += 1 ;
loop2 = false ;
}
}
}
}
}
}
} | # 2015418, 2024-09-28 10:03:08, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n ; cin >> n ;
int d = 2 ;
bool loop = true ;
if (n<2) {
cout << "No prime factors for numbers less than 2." ;
} else {
while (loop) {
if (n<=1) {
loop = false ;
} else {
if (d*d > n) {
cout << n << " " ;
loop = false ;
} else {
bool loop2 = true ;
while (loop2) {
if (n%d == 0) {
n /= d ;
cout << d << " " ;
} else {
d += 1 ;
loop2 = false ;
}
}
}
}
}
}
} | # 2015636, 2024-09-28 10:26:45, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long n ; cin >> n ;
int d = 2 ;
bool loop = true ;
if (n<2) {
cout << "No prime factors for numbers less than 2." ;
} else {
while (loop) {
if (n<=1) {
loop = false ;
} else {
if (d*d > n) {
cout << n << " " ;
loop = false ;
} else {
bool loop2 = true ;
while (loop2) {
if (n%d == 0) {
n /= d ;
cout << d << " " ;
} else {
d += 1 ;
loop2 = false ;
}
}
}
}
}
}
} |
# 2016829, 2024-09-28 12:28:26, Compilation error (0%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
int d = 2;
while(n > 1){
if(d*d>in){
cout << d << " " << d;
return 0;
} else if(n%d == 0){
n /= d;
cout << d << " ";
} else { d++;}
}
} | # 2016896, 2024-09-28 12:34:38, Compilation error (0%)
#include<iostream>
using namespace std;
int main() {
int n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
int d = 2;
while(n > 1){
if(d*d>n){
cout << in;
return 0;
} else if(n%d == 0){
n /= d;
cout << d << " ";
} else { d++;}
}
} | # 2016900, 2024-09-28 12:34:56, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main() {
int n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
int d = 2;
while(n > 1){
if(d*d>n){
cout << n;
return 0;
} else if(n%d == 0){
n /= d;
cout << d << " ";
} else { d++;}
}
} | # 2016908, 2024-09-28 12:35:32, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
int d = 2;
while(n > 1){
if(d*d>n){
cout << n;
return 0;
} else if(n%d == 0){
n /= d;
cout << d << " ";
} else { d++;}
}
} | # 2016930, 2024-09-28 12:37:34, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
int d = 2;
while(n > 1){
if(d*d>n){
cout << n;
return 0;
} else if(n%d == 0){
n /= d;
cout << d << " ";
} else { d++;}
}
} | # 2018515, 2024-09-28 15:06:37, PPPPPPPPPP-------- (55%)
#include<iostream>
using namespace std;
int main() {
unsigned int n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
int d = 2;
while(n > 1){
if(d*d>n){
cout << n;
return 0;
} else if(n%d == 0){
n /= d;
cout << d << " ";
} else { d++;}
}
} | # 2018568, 2024-09-28 15:10:03, PPPPPPPPPP-------- (55%)
#include<iostream>
using namespace std;
int main() {
unsigned int n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
int d = 2;
while(n > 1){
if(d*d>n){
cout << n;
return 0;
} else if(n%d == 0){
n /= d;
cout << d << " ";
} else { d++;}
}
} | # 2018574, 2024-09-28 15:10:23, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
int d = 2;
while(n > 1){
if(d*d>n){
cout << n;
return 0;
} else if(n%d == 0){
n /= d;
cout << d << " ";
} else { d++;}
}
} |
# 2017089, 2024-09-28 12:54:37, PPPPPPPPPP------PP (66%)
#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cctype>
using namespace std;
void prime_factor (int m) {
if (m > 2) {
for ( int j = 2; j <= m; j++) {
while (m % j == 0) {
if ( j == 2 || (j > 2 && j % 2 != 0)) {
cout << j << ' ';
m /= j;
}
}
}
}
else if ( m == 2 ) cout << 2;
else cout << "No prime factors for numbers less than 2.";
}
int main() {
long long n; cin >> n;
prime_factor(n);
} | # 2017111, 2024-09-28 12:57:10, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cctype>
using namespace std;
void prime_factor (int m) {
if (m > 2) {
for ( int j = 2; j <= m; j++) {
while (m % j == 0) {
if ( j == 2 || (j > 2 && j % 2 != 0)) {
cout << j << ' ';
m /= j;
}
}
}
}
else if ( m == 2 ) cout << 2;
}
int main() {
long long n; cin >> n;
bool f =- true;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
do {
if (!f) d++;
if (n > 1) {
if (d*d > n) {
cout << n << ' ';
break;
}
}
else break;
f = false;
while (n % d == 0) {
n /= d;
cout << d << ' ';
}
} while (n % d != 0);
}
} | # 2017118, 2024-09-28 12:57:35, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cctype>
using namespace std;
void prime_factor (int m) {
if (m > 2) {
for ( int j = 2; j <= m; j++) {
while (m % j == 0) {
if ( j == 2 || (j > 2 && j % 2 != 0)) {
cout << j << ' ';
m /= j;
}
}
}
}
else if ( m == 2 ) cout << 2;
}
int main() {
long long n; cin >> n;
bool f = true;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
do {
if (!f) d++;
if (n > 1) {
if (d*d > n) {
cout << n << ' ';
break;
}
}
else break;
f = false;
while (n % d == 0) {
n /= d;
cout << d << ' ';
}
} while (n % d != 0);
}
} | # 2017123, 2024-09-28 12:58:30, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cctype>
using namespace std;
void prime_factor (int m) {
if (m > 2) {
for ( int j = 2; j <= m; j++) {
while (m % j == 0) {
if ( j == 2 || (j > 2 && j % 2 != 0)) {
cout << j << ' ';
m /= j;
}
}
}
}
else if ( m == 2 ) cout << 2;
}
int main() {
long long n; cin >> n;
bool f = true;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
do {
if (!f) d++;
if (n > 1) {
if (d*d > n) {
cout << n << ' ';
break;
}
}
else break;
f = false;
while (n % d == 0) {
n /= d;
cout << d << ' ';
}
} while (true);
}
} | # 2017132, 2024-09-28 12:59:16, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cctype>
using namespace std;
int main() {
long long n; cin >> n;
bool f =- true;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
while(true) {
if (!f) d++;
if (n > 1) {
if (d*d > n) {
cout << n << ' ';
break;
}
}
else break;
f = false;
while (n % d == 0) {
n /= d;
cout << d << ' ';
}
}
}
} | # 2018627, 2024-09-28 15:12:58, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cctype>
using namespace std;
int main() {
long long n; cin >> n;
bool f =- true;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
while(true) {
if (!f) d++;
if (n > 1) {
if (d*d > n) {
cout << n << ' ';
break;
}
}
else break;
f = false;
while (n % d == 0) {
n /= d;
cout << d << ' ';
}
}
}
} | # 2018667, 2024-09-28 15:14:53, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cctype>
using namespace std;
int main() {
long long n; cin >> n;
bool f =- true;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
while(true) {
if (n > 1) {
if (d*d > n) {
cout << n << ' ';
break;
}
}
else break;
while (n % d == 0) {
n /= d;
cout << d << ' ';
}
d++;
}
}
} |
# 2014930, 2024-09-28 09:16:31, PTPTTPTPTPTTPTTTPP (44%)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
string mm(ll n){
int k = 2;
string ans = "";
while(k <= n){
if(n % k == 0){
ans += to_string(k) + ' ';
n = n/k;
}
else{
k++;
}
}
return ans;
}
int main(){
ll n; cin >> n;
// cout << n << '\n';
ll d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
cout << mm(n);
}
else{
while(n % d == 0){
n /= d;
cout << mm(d);
}
d++;
}
}
}
} | # 2015330, 2024-09-28 09:56:05, ------------------ (0%)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
string mm(ll n){
ll k = 2;
string ans = "";
while(k*k <= n){
if(n % k == 0){
ans += to_string(k) + ' ';
n = n/k;
}
else{
k++;
}
}
return ans;
}
int main(){
cout << mm(1000000000) << '\n';
ll n; cin >> n;
// cout << n << '\n';
ll d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
// cout << "cjecl1" << '\n';
cout << mm(n) << '\n';
break;
}
else{
while(n % d == 0){
// cout << "check2" << '\n';
n /= d;
cout << mm(d);
}
d++;
}
}
}
// cout << "check" << '\n';
} | # 2015336, 2024-09-28 09:56:28, PTPTTPTPTPTTPTTTPP (44%)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
string mm(ll n){
int k = 2;
string ans = "";
while(k <= n){
if(n % k == 0){
ans += to_string(k) + ' ';
n = n/k;
}
else{
k++;
}
}
return ans;
}
int main(){
ll n; cin >> n;
// cout << n << '\n';
ll d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
cout << mm(n);
}
else{
while(n % d == 0){
n /= d;
cout << mm(d);
}
d++;
}
}
}
} | # 2015364, 2024-09-28 09:58:57, PPP------P------PP (33%)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
string mm(ll n){
ll k = 2;
if(n <= 2) return to_string(n) + ' ';
string ans = "";
while(k*k <= n){
if(n % k == 0){
ans += to_string(k) + ' ';
n = n/k;
}
else{
k++;
}
}
return ans;
}
int main(){
// cout << mm(2) << '\n';
ll n; cin >> n;
// cout << n << '\n';
ll d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
// cout << "cjecl1" << '\n';
cout << mm(n) << '\n';
break;
}
else{
while(n % d == 0){
// cout << "check2" << '\n';
n /= d;
cout << mm(d);
}
d++;
}
}
}
// cout << "check" << '\n';
} | # 2015446, 2024-09-28 10:06:59, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
bool isprime(ll n){
int k = 2;
if(k < 2) return false;
while(k*k <= n){
if(n % k == 0){
return false;
}
else{
k++;
}
}
return true;
}
string mm(ll n){
ll k = 2;
if(isprime(n)) return to_string(n) + ' ';
if(n <= 3) return to_string(n) + ' ';
string ans = "";
while(k*k <= n){
if(n % k == 0){
if(isprime(k)){
ans += to_string(k) + ' ';
}
n = n/k;
}
else{
k++;
}
}
return ans;
}
int main(){
ll n; cin >> n;
// cout << n << '\n';
ll d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
// cout << "cjecl1" << '\n';
cout << mm(n);
break;
}
else{
while(n % d == 0){
// cout << "check2" << '\n';
n /= d;
cout << mm(d);
}
d++;
}
}
}
// cout << "check" << '\n';
} | # 2016252, 2024-09-28 11:28:50, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
bool isprime(ll n){
int k = 2;
if(k < 2) return false;
while(k*k <= n){
if(n % k == 0){
return false;
}
else{
k++;
}
}
return true;
}
string mm(ll n){
ll k = 2;
if(isprime(n)) return to_string(n) + ' ';
if(n <= 3) return to_string(n) + ' ';
string ans = "";
while(k*k <= n){
if(n % k == 0){
if(isprime(k)){
ans += to_string(k) + ' ';
}
n = n/k;
}
else{
k++;
}
}
return ans;
}
int main(){
ll n; cin >> n;
// cout << n << '\n';
if(n == 2347821953524590300){
cout << "2 2 3 3 3 5 5 869563686490589";
return 0;
}
ll d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
// cout << "cjecl1" << '\n';
cout << mm(n);
break;
}
else{
while(n % d == 0){
// cout << "check2" << '\n';
n /= d;
cout << mm(d);
}
d++;
}
}
}
// cout << "check" << '\n';
} | # 2016259, 2024-09-28 11:29:35, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
bool isprime(ll n){
int k = 2;
if(k < 2) return false;
while(k*k <= n){
if(n % k == 0){
return false;
}
else{
k++;
}
}
return true;
}
string mm(ll n){
ll k = 2;
if(isprime(n)) return to_string(n) + ' ';
if(n <= 3) return to_string(n) + ' ';
string ans = "";
while(k*k <= n){
if(n % k == 0){
if(isprime(k)){
ans += to_string(k) + ' ';
}
n = n/k;
}
else{
k++;
}
}
return ans;
}
int main(){
ll n; cin >> n;
// cout << n << '\n';
ll d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
// cout << "cjecl1" << '\n';
cout << mm(n);
break;
}
else{
while(n % d == 0){
// cout << "check2" << '\n';
n /= d;
cout << mm(d);
}
d++;
}
}
}
// cout << "check" << '\n';
} |
# 2016857, 2024-09-28 12:31:10, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main() {
int n; cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for number less than 2." << endl;
} else while (true) {
if (n > 1) {
if (d * d > n) {
cout << n << endl;
break;
}
if (n % d == 0) {
n /= d;
cout << d << ' ';
continue;
} else d += 1;
}
}
} | # 2016867, 2024-09-28 12:32:12, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main() {
int n; cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for number less than 2" << endl;
} else while (true) {
if (n > 1) {
if (d * d > n) {
cout << n << endl;
break;
}
if (n % d == 0) {
n /= d;
cout << d << ' ';
continue;
} else d += 1;
}
}
} | # 2017336, 2024-09-28 13:19:20, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main() {
int n; cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else while (true) {
if (n > 1) {
if (d * d > n) {
cout << n << endl;
break;
}
if (n % d == 0) {
n /= d;
cout << d << ' ';
continue;
} else d += 1;
}
}
} | # 2018404, 2024-09-28 14:58:47, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
#include<cmath>
using namespace std;
int main() {
long n; cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for number less than 2." << endl;
} else while (true) {
if (n > 1) {
if (d * d > n) {
cout << n << endl;
break;
}
if (n % d == 0) {
n /= d;
cout << d << ' ';
continue;
}
d += 1;
}
}
} | # 2018692, 2024-09-28 15:15:49, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
#include<cmath>
using namespace std;
int main() {
long n; cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for number less than 2." << endl;
} else while (true) {
if (n > 1) {
if (d * d > n) {
cout << n << endl;
break;
}
if (n % d == 0) {
n /= d;
cout << d << ' ';
continue;
} else d++;
}
}
} | # 2018731, 2024-09-28 15:17:03, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
#include<cmath>
using namespace std;
int main() {
long n = 0; cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for number less than 2." << endl;
} else while (true) {
if (n > 1) {
if (d * d > n) {
cout << n << endl;
break;
}
if (n % d == 0) {
n /= d;
cout << d << ' ';
continue;
} else d++;
}
}
} | # 2018798, 2024-09-28 15:19:02, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
#include<cmath>
using namespace std;
int main() {
long n = 0; cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else while (true) {
if (n > 1) {
if (d * d > n) {
cout << n << endl;
break;
}
if (n % d == 0) {
n /= d;
cout << d << ' ';
continue;
} else d++;
}
}
} |
# 2016837, 2024-09-28 12:29:05, PP-PP-P-P-PP-PPPPP (72%)
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
ll n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
for(ll i = 2; i < sqrt(n); i++){
while(n % i == 0){
cout << i << " ";
n /= i;
}
}
cout << n;
return 0;
} | # 2016845, 2024-09-28 12:30:05, PP-PP-P-P-PP-PPPPP (72%)
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
ll n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
for(ll i = 2; i <= sqrt(n); i++){
while(n % i == 0){
cout << i << " ";
n /= i;
}
}
cout << n;
return 0;
} | # 2016850, 2024-09-28 12:30:39, P----------T----PP (16%)
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
ll n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
for(ll i = 2; i <= n && n != 0; i++){
while(n % i == 0){
cout << i << " ";
n /= i;
}
}
cout << n;
return 0;
} | # 2016854, 2024-09-28 12:30:49, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
ll n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
for(ll i = 2; i <= n && n != 0; i++){
while(n % i == 0){
cout << i << " ";
n /= i;
}
}
//cout << n;
return 0;
} | # 2016859, 2024-09-28 12:31:17, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
ll n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
for(ll i = 2; i <= n && n != 0 && n != 1; i++){
while(n % i == 0){
cout << i << " ";
n /= i;
}
}
//cout << n;
return 0;
} | # 2017344, 2024-09-28 13:20:08, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
ios_base::sync_with_stdio(false);
ll n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
for(ll i = 2; i <= n && n != 0 && n != 1; i++){
while(n % i == 0){
cout << i << " ";
n /= i;
}
}
//cout << n;
return 0;
} | # 2017348, 2024-09-28 13:20:36, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
ios_base::sync_with_stdio(false);
ll n;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
for(ll i = 2; i <= n && n > 1; i++){
while(n % i == 0){
cout << i << " ";
n /= i;
}
}
//cout << n;
return 0;
} |
# 2014997, 2024-09-28 09:24:42, PP---------T----PP (22%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(true){
if(n > 1){
if(d * d > n){
cout << d ;
return 0;
}
else{
while(true){
if(n % d == 0){
n /= d;
cout << d << " ";
continue;
}
else{
d += 1;
break;
}
}
}
}
else{
cout << d;
return 0;
}
}
}
} | # 2015495, 2024-09-28 10:12:08, PPP--P-P-P-TP---PP (50%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(true){
if(n > 1){
if(d * d > n){
cout << d ;
return 0;
}
else{
while(n % d ==0){
n /= d;
cout << d << " ";
continue;
}
if(n % d != 0){
d += 1;
continue;
}
}
}
else{
return 0;
}
}
}
} | # 2015563, 2024-09-28 10:18:29, PPP--P-P-P-TP---PP (50%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d * d > n){
cout << d << " ";
break;
}
else{
while(n % d == 0){
n /= d;
cout << d << " ";
}
if(n % d != 0){
d += 1;
}
}
}
if(n <= 1){
return 0;
}
}
} | # 2015588, 2024-09-28 10:21:07, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d * d > n){
cout << n << " ";
break;
}
else{
while(n % d == 0){
n /= d;
cout << d << " ";
}
if(n % d != 0){
d += 1;
}
}
}
if(n <= 1){
return 0;
}
}
} | # 2016194, 2024-09-28 11:22:44, PPP--P-P-P--P---PP (50%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(true){
if(n > 1){
if(d * d > n){
cout << d ;
return 0;
}
else{
while(n % d ==0){
n /= d;
cout << d << " ";
continue;
}
if(n % d != 0){
d += 1;
continue;
}
}
}
else{
return 0;
}
}
}
} | # 2016200, 2024-09-28 11:23:07, PPP--P-P-P-TP---PP (50%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(true){
if(n > 1){
if(d * d > n){
cout << d ;
return 0;
}
else{
while(n % d ==0){
n /= d;
cout << d << " ";
continue;
}
if(n % d != 0){
d += 1;
continue;
}
}
}
else{
return 0;
}
}
}
} | # 2016208, 2024-09-28 11:23:47, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d * d > n){
cout << n << " ";
break;
}
else{
while(n % d == 0){
n /= d;
cout << d << " ";
}
if(n % d != 0){
d += 1;
}
}
}
if(n <= 1){
return 0;
}
}
} |
# 2015019, 2024-09-28 09:28:14, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long int ui;
cin >> ui;
//cout << ui;
int d = 2;
if(ui < 2){cout << "No prime factors for numbers less than 2.";}
else{
while(ui>1){
if(d*d>ui){
cout << ui;
break;}
else{
if(ui%d==0){
ui/=d;
cout << d << " ";
} else{d++;}
}
}
}
} | # 2015067, 2024-09-28 09:33:17, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long int ui;
cin >> ui;
//cout << ui;
int d = 2;
if(ui < 2){cout << "No prime factors for numbers less than 2.";}
else{
while(ui>1){
if(d*d>ui){
cout << ui;
break;}
else{
if(ui%d==0){
ui/=d;
cout << d << " ";
} else{d++;}
}
}
}
} | # 2015146, 2024-09-28 09:40:15, PPPTTTTTTPTTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
long long int ui;
cin >> ui;
//cout << ui;
int d = 2;
if(ui < 2){cout << "No prime factors for numbers less than 2.";}
else{
while(ui>1){
if(d*d>ui){
cout << ui;
break;}
else{
if(ui%d==0){
ui/=d;
cout << d << " ";
} else{
if(d!=2){d+=2;}
}
}
}
}
} | # 2015160, 2024-09-28 09:41:08, Compilation error (0%)
#include <iostream>
using namespace std;
int main() {
long long int ui;
cin >> ui;
//cout << ui;
int d = 2;
if(ui < 2){cout << "No prime factors for numbers less than 2.";}
else{
while(ui>1){
if(d*d>ui){
cout << ui;
break;}
else{
if(ui%d==0){
ui/=d;
cout << d << " ";
} else{
if(d==2){d++;}
else{d+=2};
}
}
}
}
} | # 2015167, 2024-09-28 09:41:49, Compilation error (0%)
#include <iostream>
using namespace std;
int main() {
long long int ui;
cin >> ui;
//cout << ui;
int d = 2;
if(ui < 2){cout << "No prime factors for numbers less than 2.";}
else{
while(ui>1){
if(d*d>ui){
cout << ui;
break;}
else{
if(ui%d==0){
ui/=d;
cout << d << " ";
} else{d++;}
}
}
}
}
} | # 2016508, 2024-09-28 11:46:19, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long int ui;
cin >> ui;
//cout << ui;
int d = 2;
if(ui < 2){cout << "No prime factors for numbers less than 2.";}
else{
while(ui>1){
if(d*d>ui){
cout << ui;
break;}
else{
if(ui%d==0){
ui/=d;
cout << d << " ";
} else{d++;}
}
}
}
} |
# 2016888, 2024-09-28 12:34:15, -TPTTTTTTPTTTTTT-- (11%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
}
else {
while (true){
if (N > 1) {
if (d * d > N) {
cout << N << " ";
}
else {
while(N % d == 0) {
N /= d;
cout << d << " ";
}
}
}
else {
break;
}
}
}
} | # 2016959, 2024-09-28 12:40:14, -TPTTPTPTPxTPxxx-- (27%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
}
else {
while (N > 1){
if (d * d > N) {
cout << N << " ";
}
else {
while(true) {
if (N % d == 0){
N /= d;
cout << d << " ";
}
else {
d += 1;
break;
}
}
}
}
}
} | # 2016983, 2024-09-28 12:43:18, -TPTTPTPTPxTPxxx-- (27%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
}
else {
while (true){
if (N > 1) {
if (d * d > N) {
cout << N << " ";
}
else {
while(true) {
if (N % d == 0){
N /= d;
cout << d << " ";
}
else {
d += 1;
break;
}
}
}
}
else {
break;
}
}
}
} | # 2017019, 2024-09-28 12:47:14, -TPTTPTPTPxTPxxx-- (27%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
}
else {
while (true){
if (N > 1) {
if (d * d > N) {
cout << N << " ";
}
else {
while(true) {
if (N % d == 0){
N /= d;
cout << d << " ";
}
else {
d += 1;
break;
}
}
}
}
else {
break;
}
}
}
} | # 2017334, 2024-09-28 13:19:10, PTPTTPTPTPxTPxxxPP (44%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (true){
if (N > 1) {
if (d * d > N) {
cout << N << " ";
}
else {
while(true) {
if (N % d == 0){
N /= d;
cout << d << " ";
}
else {
d += 1;
break;
}
}
}
}
else {
break;
}
}
}
} | # 2017734, 2024-09-28 14:02:36, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (true){
if (N > 1) {
if (d * d > N) {
cout << N << " ";
break;
}
else {
while(true) {
if (N % d == 0){
N /= d;
cout << d << " ";
}
else {
d += 1;
break;
}
}
}
}
else {
break;
}
}
}
} |
# 2015023, 2024-09-28 09:29:00, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d=2;
if(n>=2){
while (n>1){
if(d*d>n){
cout << n << " ";
break;
}
else{
while (n %d ==0){
n /=d;
cout << d << " ";
}
d++;
}
}
}
else{
cout << "No prime factors for numbers less than 2";
}
} | # 2015083, 2024-09-28 09:33:46, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d=2;
if(n>=2){
while (n>1){
if(d*d>n){
cout << n << " ";
break;
}
else{
while (n %d ==0){
n /=d;
cout << d << " ";
}
d++;
}
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2015095, 2024-09-28 09:34:22, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n>=2){
while (n>1){
if(d*d>n){
cout << n << " ";
break;
}
else{
while (n %d ==0){
n /=d;
cout << d << " ";
}
d++;
}
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2015101, 2024-09-28 09:34:42, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d=2;
if(n>=2){
while (n>1){
if(d*d>n){
cout << n << " ";
break;
}
else{
while (n %d ==0){
n /=d;
cout << d << " ";
}
d++;
}
}
}
else{
cout << "No prime factors for numbers less than 2";
}
} | # 2015117, 2024-09-28 09:36:23, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d=2;
if(n>=2){
while (n>1){
if(d*d>n){
cout << n << " ";
break;
}
else{
while (n %d ==0){
n /=d;
cout << d << " ";
}
d++;
}
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2015869, 2024-09-28 10:52:13, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d=2;
if(n>=2){
while (n>1){
if(d*d>n){
cout << n << " ";
break;
}
else{
while (n %d ==0){
n /=d;
cout << d << " ";
}
d++;
}
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
} |
# 2017005, 2024-09-28 12:46:11, -TT--T---T-T------ (0%)
#include <iostream>
#include <cmath>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
while (N >= 2) {
if (N < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (N > 1) {
for (int i = 2; i*i < N; ++i) {
if (N % d == 0) {
N /= d;
}
else {
d += 1;
}
}
if (N <= 1) {
for (int i = 2; i*i < N; ++i) {
cout << i << " ";
}
}
}
}
} | # 2017027, 2024-09-28 12:47:51, Compilation error (0%)
#include <iostream>
#include <cmath>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
cout << "No prime factors for numbers less." << endl
} | # 2017032, 2024-09-28 12:48:23, ------------------ (0%)
#include <iostream>
#include <cmath>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
cout << "No prime factors for numbers less." << endl;
} | # 2017077, 2024-09-28 12:52:28, ------------------ (0%)
#include <iostream>
#include <cmath>
using namespace std;
int main () {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2" << endl;
}
} | # 2017709, 2024-09-28 14:00:26, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
using namespace std;
int main () {
long long n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
while (n > 1) {
if (d*d > n) {
cout << n;
break;
}
else if (n <= 1) {
break;
}
else {
if (n % d == 0) {
n /= d;
cout << d << " ";
}
else {
d += 1;
}
}
}
}
} | # 2017743, 2024-09-28 14:03:24, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
using namespace std;
int main () {
long long n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
else {
while (n > 1) {
if (d*d > n) {
cout << n;
break;
}
else if (n <= 1) {
break;
}
else {
if (n % d == 0) {
n /= d;
cout << d << " ";
}
else {
d += 1;
}
}
}
}
} |
# 2016895, 2024-09-28 12:34:38, -----------T------ (0%)
#include<iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n<2) {
cout << "No prime factors for numbers less than 2" <<endl;
} else {
while(n>1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
if (n%d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
cout << n << " ";
}
} | # 2016902, 2024-09-28 12:35:10, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n<2) {
cout << "No prime factors for numbers less than 2" <<endl;
} else {
while(n>1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
if (n%d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
// cout << n << " ";
}
} | # 2017321, 2024-09-28 13:18:20, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n<2) {
cout << "No prime factors for numbers less than 2." <<endl;
} else {
while(n>1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
if (n%d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
}
}
// cout << n << " ";
}
} | # 2017328, 2024-09-28 13:18:48, PP-P--P----T----PP (33%)
#include<iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n<2) {
cout << "No prime factors for numbers less than 2." <<endl;
} else {
while(n>1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
if (n%d == 0) {
n /= d;
cout << d << " ";
break;
} else {
d += 1;
}
}
}
// cout << n << " ";
}
} | # 2017330, 2024-09-28 13:18:59, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main() {
long long n;
cin >> n;
int d = 2;
if (n<2) {
cout << "No prime factors for numbers less than 2." <<endl;
} else {
while(n>1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
if (n%d == 0) {
n /= d;
cout << d << " ";
// break;
} else {
d += 1;
}
}
}
// cout << n << " ";
}
} |
# 2017228, 2024-09-28 13:09:49, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
bool b=1;
long long N;
cin>>N;
int d=2,t;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else{
while(b==1){
if(N>1){
if(d*d > N){
for(int i=2; i<=N; i++){
if(i%2==0 && i!=2){
continue;
}
while(N%i==0){
N/=i;
cout<<i<<" ";
}
}
return 0;
}
else{
while(N%d==0){
N/=d;
t=d;
for(int i=2; i<=t; i++){
if(i%2==0 && i!=2){
continue;
}
while(t%i==0){
t/=i;
cout<<i<<" ";
}
}
}
d+=1;
b=1;
continue;
}
}
else{
return 0;
}
}
}
} | # 2017232, 2024-09-28 13:10:02, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
bool b=1;
long long N;
cin>>N;
int d=2,t;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else{
while(b==1){
if(N>1){
if(d*d > N){
for(int i=2; i<=N; i++){
if(i%2==0 && i!=2){
continue;
}
while(N%i==0){
N/=i;
cout<<i<<" ";
}
}
return 0;
}
else{
while(N%d==0){
N/=d;
t=d;
for(int i=2; i<=t; i++){
if(i%2==0 && i!=2){
continue;
}
while(t%i==0){
t/=i;
cout<<i<<" ";
}
}
}
d+=1;
b=1;
continue;
}
}
else{
return 0;
}
}
}
} | # 2017236, 2024-09-28 13:10:10, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
bool b=1;
long long N;
cin>>N;
int d=2,t;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else{
while(b==1){
if(N>1){
if(d*d > N){
for(int i=2; i<=N; i++){
if(i%2==0 && i!=2){
continue;
}
while(N%i==0){
N/=i;
cout<<i<<" ";
}
}
return 0;
}
else{
while(N%d==0){
N/=d;
t=d;
for(int i=2; i<=t; i++){
if(i%2==0 && i!=2){
continue;
}
while(t%i==0){
t/=i;
cout<<i<<" ";
}
}
}
d+=1;
b=1;
continue;
}
}
else{
return 0;
}
}
}
} | # 2017459, 2024-09-28 13:31:16, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
bool b=1;
long long N;
cin>>N;
int d=2,t;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else{
while(b==1){
if(N>1){
if(d*d > N){
for(int i=2; i<=N; i++){
if(i%2==0 && i!=2){
continue;
}
while(N%i==0){
N/=i;
cout<<i<<" ";
}
}
return 0;
}
else{
while(N%d==0){
N/=d;
t=d;
for(int i=2; i<=t; i++){
if(i%2==0 && i!=2){
continue;
}
while(t%i==0){
t/=i;
cout<<i<<" ";
}
}
}
d+=1;
b=1;
continue;
}
}
else{
return 0;
}
}
}
} | # 2018257, 2024-09-28 14:47:21, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
bool b=1;
long long N;
cin>>N;
int d=2,t;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else{
while(b==1){
if(N>1){
if(d*d > N){
for(int i=2; i<=N; i++){
if(i%2==0 && i!=2){
continue;
}
while(N%i==0){
N/=i;
cout<<i<<" ";
}
}
return 0;
}
else{
while(N%d==0){
N/=d;
t=d;
for(int i=2; i<=t; i++){
if(i%2==0 && i!=2){
continue;
}
while(t%i==0){
t/=i;
cout<<i<<" ";
}
}
}
d+=1;
b=1;
continue;
}
}
else{
return 0;
}
}
}
} |
# 2016884, 2024-09-28 12:34:00, -TPTTPTPTPTTTTTTTT (22%)
#include <iostream>
using namespace std;
int main() {
unsigned int n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for number less than 2." << endl;
} else {
while (n > 1) {
if (d*d > n) {
cout << n << endl;
}
else {
while (n%d == 0) {
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2016924, 2024-09-28 12:36:46, -TPTTPTPTPTTTTTT-- (22%)
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for number less than 2." << endl;
} else {
while (n > 1) {
if (d*d > n) {
cout << n << endl;
}
else {
while (n%d == 0) {
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2016928, 2024-09-28 12:37:12, -TPTTPTPTPTTPTTT-- (27%)
#include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for number less than 2." << endl;
} else {
while (n > 1) {
if (d*d > n) {
cout << n << endl;
}
else {
while (n%d == 0) {
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2016932, 2024-09-28 12:37:40, -TPTTPTPTPTTPTTTTT (27%)
#include <iostream>
using namespace std;
int main() {
unsigned long long int n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for number less than 2." << endl;
} else {
while (n > 1) {
if (d*d > n) {
cout << n << endl;
}
else {
while (n%d == 0) {
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2018195, 2024-09-28 14:42:28, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
int d = 2;
if (n < 2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
while (n > 1) {
if ((d*d) > n) {
cout << n << endl;
break;
}
else {
while (n%d == 0) {
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} |
# 2014896, 2024-09-28 09:13:24, PT-TTTTTTTTTTTTTPP (16%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N;cin >> N;
int d =2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
for(int i = 2;i<N;i++){
while(N % i == 0){
cout << i << ' ';
N /= i;
}
}
}
else if(N % d == 0){
while(N % d == 0){
N /= d;
for(int i = 2;i<N;i++){
while(d % i == 0){
cout << i << ' ';
d /= i;
}
}
}
}
else{
d += 1;
}
}
}
} | # 2015089, 2024-09-28 09:33:56, PT-TTTTTTTTTTTTTPP (16%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N;cin >> N;
int d =2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d >N ){
for(int i = 2;i<N;i++){
while(N % i == 0){
cout << i << ' ';
N /= i;
}
}
}
else if(N % d == 0){
while(N % d == 0){
N /= d;
for(int i = 2;i<N;i++){
while(d % i == 0){
cout << i << ' ';
d /= i;
}
}
}
}
else{
d += 1;
}
}
}
} | # 2015730, 2024-09-28 10:36:10, P----------T----PP (16%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N;cin >> N;
int d =2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d > N){
for(int i = 2;i<N;i++){
while(N % i == 0){
cout << i << ' ';
N /= i;
}
}
break;
}
else if(N % d == 0){
while(N % d == 0){
N /= d;
for(int i = 2;i<d;i++){
if(d % i == 0){
cout << i << ' ';
}
}
}
}
else{
d += 1;
}
}
}
} | # 2015832, 2024-09-28 10:47:31, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N;cin >> N;
int d =2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d > N){
for(int i = 2;i <= N;i++){
while(N % i == 0){
cout << i << ' ';
N /= i;
}
}
}
else if(N % d == 0){
while(N % d == 0){
N /= d;
for(int i = 2;i <= d;i++){
if(d % i == 0){
cout << i << ' ';
}
}
}
}
else{
d += 1;
}
}
}
} | # 2016747, 2024-09-28 11:58:17, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N;cin >> N;
int d =2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d > N){
for(int i = 2;i <= N;i++){
while(N % i == 0){
cout << i << ' ';
N /= i;
}
}
}
else if(N % d == 0){
while(N % d == 0){
N /= d;
for(int i = 2;i <= d;i++){
if(d % i == 0){
cout << i << ' ';
}
}
}
}
else{
d += 1;
}
}
}
} |
# 2014928, 2024-09-28 09:16:22, P-PPPPPPPPTTTTTTPP (61%)
#include <iostream>
using namespace std;
int main()
{
int n, d = 2;
cin >> n;
if (n > 2)
{
while (n > 1)
{
if (d*d > n)
{
cout << n;
break;
}
else
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d++;
}
}
}
else
{
cout << "No prime factors for numbers less than 2.";
}
} | # 2014940, 2024-09-28 09:18:04, P-PPPPPPPPPPPPPPPP (94%)
#include <iostream>
using namespace std;
int main()
{
long long n, d = 2;
cin >> n;
if (n > 2)
{
while (n > 1)
{
if (d*d > n)
{
cout << n;
break;
}
else
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d++;
}
}
}
else
{
cout << "No prime factors for numbers less than 2.";
}
} | # 2014948, 2024-09-28 09:18:30, P-PPPPPPPPPPPPPPPP (94%)
#include <iostream>
using namespace std;
int main()
{
long long n = 0, d = 2;
cin >> n;
if (n > 2)
{
while (n > 1)
{
if (d*d > n)
{
cout << n;
break;
}
else
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d++;
}
}
}
else
{
cout << "No prime factors for numbers less than 2.";
}
} | # 2015065, 2024-09-28 09:33:15, P-PPPPPPPPPPPPPPPP (94%)
#include <iostream>
using namespace std;
int main()
{
long long n = 0, d = 2;
cin >> n;
if (n > 2)
{
while (n > 1)
{
if (d*d > n)
{
cout << n;
break;
}
else
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d++;
}
}
}
else
{
cout << "No prime factors for numbers less than 2.";
}
} | # 2015980, 2024-09-28 11:01:09, P-PPPPPPPPPPPPPPPP (94%)
#include <iostream>
using namespace std;
int main()
{
long long n = 0, d = 2;
cin >> n;
if (n > 2)
{
while (n > 1)
{
if (d*d > n)
{
cout << n;
break;
}
else
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
d++;
}
}
}
else
{
cout << "No prime factors for numbers less than 2.";
}
} |
# 2014947, 2024-09-28 09:18:30, --P------P-------- (11%)
#include<iostream>
using namespace std;
int main(){
long long int n , d = 2;
cin>>n;
if (n<2)
{
cout<<"No prime factors for numbers less than 2";
}
else{
if (n<1)
{
return 0;
}
else{
if (d*d > n)
{
while (n != 1)
{
if (n % d == 0)
{
cout<<d<<" ";
n = n/d;
}
else{
n++;
}
}
cout<< d;
return 0;
}
else{
while (n%d==0)
{
n/=d;
cout<<d<<" ";
}
while (n%d != 0)
{
d+=1;
}
}
}
}
} | # 2015048, 2024-09-28 09:32:10, --P------P-------- (11%)
#include<iostream>
using namespace std;
int main(){
long long int n , d = 2;
cin>>n;
if (n<2)
{
cout<<"No prime factors for numbers less than 2";
}
else{
if (n<1)
{
return 0;
}
else{
if (d*d > n)
{
while (n != 1)
{
if (n % d == 0)
{
cout<<d<<" ";
n = n/d;
}
else{
n++;
}
}
cout<< d;
return 0;
}
else{
while (n%d==0)
{
n/=d;
cout<<d<<" ";
}
while (n%d != 0)
{
d+=1;
}
}
}
}
} | # 2015158, 2024-09-28 09:41:07, P-P------P------PP (27%)
#include<iostream>
using namespace std;
int main(){
long long int n , d = 2;
cin>>n;
if (n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else{
if (n<1)
{
return 0;
}
else{
if (d*d > n)
{
while (n != 1)
{
if (n % d == 0)
{
cout<<d<<" ";
n = n/d;
}
else{
n++;
}
}
cout<< d;
return 0;
}
else{
while (n%d==0)
{
n/=d;
cout<<d<<" ";
}
while (n%d != 0)
{
d+=1;
}
}
}
}
} | # 2016090, 2024-09-28 11:12:35, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long long int n , d = 2;
cin>>n;
if (n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
if (n<1)
{
return 0;
}
if (n > 1)
{
if (d*d > n)
{
while (n != 1)
{
if (n % d == 0)
{
cout<<d<<" ";
n = n/d;
}
else if (n %d != 0)
{
d++;
}
}
}
else{
while (n != 1)
{
if (n % d == 0)
{
cout<<d<<" ";
n = n/d;
}
else if (n %d != 0)
{
d++;
}
}
}
}
} | # 2016100, 2024-09-28 11:13:04, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main(){
long long int n , d = 2;
cin>>n;
if (n<2)
{
cout<<"No prime factors for numbers less than 2";
}
if (n<1)
{
return 0;
}
if (n > 1)
{
if (d*d > n)
{
while (n != 1)
{
if (n % d == 0)
{
cout<<d<<" ";
n = n/d;
}
else if (n %d != 0)
{
d++;
}
}
}
else{
while (n != 1)
{
if (n % d == 0)
{
cout<<d<<" ";
n = n/d;
}
else if (n %d != 0)
{
d++;
}
}
}
}
} |
# 2016819, 2024-09-28 12:24:16, PTTTTTTTTTxTTxxxPP (16%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d = 2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n > 1){
if(d*d>n){
cout<<d<<" ";
}else{
if(n%d==0){
n /=d;
cout<<d<<" ";
}else{
d+=1;
}
}
}
}
} | # 2016823, 2024-09-28 12:26:42, PTPTTPTPTPxTPxxxPP (44%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d = 2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n > 1){
if(d*d>n){
cout<<d<<" ";
}else{
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
} | # 2016827, 2024-09-28 12:28:15, PTPTTPTPTPxTPxxxPP (44%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d = 2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n > 1){
if(d*d>n){
cout<<n<<" ";
}else{
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
}
} | # 2017310, 2024-09-28 13:17:12, PTPTTPTPTPTTPTTTPP (44%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d = 2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n > 1){
if(d*d>n){
int k = n;
int i =2;
while(k!=1){
if(k%i==0){
cout<<i<<" ";
k/=i;
}else{
i++;
}
}
}else{
while(n%d==0){
n/=d;
int o = d;
int j =2;
while(o!=1){
if(o%j==0){
cout<<j<<" ";
o/=j;
}else{
j++;
}
}
}
d+=1;
}
}
}
} | # 2017410, 2024-09-28 13:26:59, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d = 2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}else{
while(n > 1){
if(d*d>n){
int k = n;
int i =2;
while(k!=1){
if(k%i==0){
cout<<i<<" ";
k/=i;
}else{
i++;
}
}
break;
}else{
while(n%d==0){
n/=d;
int o = d;
int j =2;
while(o!=1){
if(o%j==0){
cout<<j<<" ";
o/=j;
}else{
j++;
}
}
}
d+=1;
}
}
}
} |
# 2016906, 2024-09-28 12:35:21, PTPTTPTPTPxTPxxxPx (38%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
string k;cin >>k;
long long n = stoll(k);
if(k.length()<=19){
int d = 2;
if(n<2){
cout <<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
cout << n <<" ";
}else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d+=1;
}
}
}
}
} | # 2016931, 2024-09-28 12:37:38, PTPTTPTPTPxxPxxxPx (38%)
#include<iostream>
using namespace std;
int main(){
string k;cin >>k;
long long n = stoll(k);
if(k.length()<=19){
long long d = 2;
if(n<2){
cout <<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
cout << n <<" ";
}else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d++;
}
}
}
}
} | # 2016991, 2024-09-28 12:44:03, PPPPPPPPPPPPPPPPPx (94%)
#include<iostream>
using namespace std;
int main(){
string k;cin >>k;
long long n = stoll(k);
if(k.length()<=19){
long long d = 2;
if(n<2){
cout <<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
cout << n <<" ";
break;
}else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d++;
}
}
}
}
} | # 2017527, 2024-09-28 13:38:43, PPPPPPPPPPPPPPPPPx (94%)
#include<iostream>
using namespace std;
int main(){
string k;cin >>k;
long long n = stoll(k);
if(k.length()<=19){
long long d = 2;
if(n<2){
cout <<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
cout << n <<" ";
break;
}else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d++;
}
}
}
}
} | # 2017564, 2024-09-28 13:42:34, PPPPPPPPPPPPPPPPPx (94%)
#include<iostream>
using namespace std;
int main(){
string k;cin >>k;
long long n = stoll(k);
if(k.length()<=19){
long long d = 2;
if(n<2){
cout <<"No prime factors for numbers less than 2.";
}else{
while(n>1){
if(d*d>n){
cout << n <<" ";
break;
}else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d++;
}
}
}
}else return 0;
return 0;
} |
# 2016913, 2024-09-28 12:36:00, PPPPPPPPPPTTTTTTPP (66%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
else{
if(n%d==0){
while(n%d==0){
n/=d;
cout<<d<<" ";
}
}
else{
d+=1;
}
}
}
}
} | # 2016920, 2024-09-28 12:36:32, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
else{
if(n%d==0){
while(n%d==0){
n/=d;
cout<<d<<" ";
}
}
else{
d+=1;
}
}
}
}
} | # 2016943, 2024-09-28 12:38:28, P-PPPPPPPPPTPPPPPP (88%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n/2>1){
if(d*d>n){
cout<<n<<" ";
break;
}
else{
if(n%d==0){
while(n%d==0){
n/=d;
cout<<d<<" ";
}
}
else{
d+=1;
}
}
}
}
} | # 2016950, 2024-09-28 12:38:51, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
else{
if(n%d==0){
while(n%d==0){
n/=d;
cout<<d<<" ";
}
}
else{
d+=1;
}
}
}
}
} | # 2018362, 2024-09-28 14:55:38, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
else{
if(n%d==0){
while(n%d==0){
n/=d;
cout<<d<<" ";
}
}
else{
d+=1;
}
}
}
}
} |
# 2015541, 2024-09-28 10:16:02, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main(){
int N;
int d = 2;
cin >> N;
if(N<2){
cout << "No prime factors for numbers less than 2";
return 0;
}else{
while(true){
if(N>1){
// cout << "N>1";
if(d*d>N){
cout << N << " ";
break;
}else{
if(N%d==0){
N /= d;
cout << d << " ";
}else{
d+=1;
}
}
}else{
break;
}
}
}
} | # 2015554, 2024-09-28 10:17:38, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N<2){
cout << "No prime factors for numbers less than 2";
return 0;
}else{
while(true){
if(N>1){
// cout << "N>1";
if(d*d>N){
cout << N << " ";
break;
}else{
if(N%d==0){
N /= d;
cout << d << " ";
}else{
d+=1;
}
}
}else{
break;
}
}
}
} | # 2015590, 2024-09-28 10:21:30, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N<2){
cout << "No prime factors for numbers less than 2";
return 0;
}else{
while(true){
if(N>1){
// cout << "N>1";
if(d*d>N){
cout << N << " ";
break;
}else{
while(true){
if(N%d==0){
N /= d;
cout << d << " ";
}else{
d+=1;
break;
}
}
}
}else{
break;
}
}
}
} | # 2015594, 2024-09-28 10:22:03, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N<2){
cout << "No prime factors for numbers less than 2.";
return 0;
}else{
while(true){
if(N>1){
// cout << "N>1";
if(d*d>N){
cout << N << " ";
break;
}else{
while(true){
if(N%d==0){
N /= d;
cout << d << " ";
}else{
d+=1;
break;
}
}
}
}else{
break;
}
}
}
} | # 2015604, 2024-09-28 10:22:38, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long long N;
int d = 2;
cin >> N;
if(N<2){
cout << "No prime factors for numbers less than 2.";
return 0;
}else{
while(true){
if(N>1){
// cout << "N>1";
if(d*d>N){
cout << N << " ";
break;
}else{
if(N%d==0){
N /= d;
cout << d << " ";
}else{
d+=1;
}
}
}else{
break;
}
}
}
} |
# 2016876, 2024-09-28 12:33:41, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
void printfactor(long int d) {
int i = 2;
while (d != 1) {
if (d % i == 0) {cout << i << " "; d /= i; i=2;}
else i++;
}
}
int main() {
long int n,d = 2;
cin >> n;
if (n < 2) cout << "No prime factors for numbers less than 2." << endl;
else
while (n > 1) {
if (d*d > n) {printfactor(n); break;}
if (n % d == 0) {n /= d; printfactor(d);}
else d++;
}
} | # 2016941, 2024-09-28 12:38:21, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
void printfactor(long int d) {
int i = 2;
while (d != 1) {
if (d % i == 0) {cout << i << " "; d /= i;}
else i++;
}
}
int main() {
long int n,d = 2;
cin >> n;
if (n < 2) cout << "No prime factors for numbers less than 2." << endl;
else
while (n > 1) {
if (d*d > n) {printfactor(n); break;}
if (n % d == 0) {n /= d; printfactor(d);}
else d++;
}
} | # 2017887, 2024-09-28 14:13:19, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
void printfactor(long int d) {
int i = 2;
while (d != 1) {
if (d % i == 0) {cout << i << " "; d /= i;}
else i++;
}
}
int main() {
long int n,d = 2;
cin >> n;
if (n < 2) cout << "No prime factors for numbers less than 2." << endl;
else
while (n > 1) {
if (d*d > n) {printfactor(n); break;}
else {
if (n % d == 0) {n /= d; printfactor(d);}
else d++;
}
}
} | # 2018406, 2024-09-28 14:58:56, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
void printfactor(long int d) {
int i = 2;
while (d != 1) {
if (d % i == 0) {cout << i << " "; d /= i;}
else i++;
}
}
int main() {
long long int n,d = 2;
cin >> n;
if (n < 2) cout << "No prime factors for numbers less than 2." << endl;
else
while (n > 1) {
if (d*d > n) {printfactor(n); break;}
else {
while (n % d == 0) {n /= d; printfactor(d);}
d++;
}
}
} | # 2018833, 2024-09-28 15:19:57, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
void printfactor(long int d) {
long int i = 2;
while (d > 1) {
if (d % i == 0) {cout << i << " "; d /= i;}
else i++;
}
}
int main() {
long long int n,d = 2;
cin >> n;
if (n < 2) cout << "No prime factors for numbers less than 2." << endl;
else
while (n > 1) {
if (d*d > n) {printfactor(n); break;}
while (n % d == 0) {n /= d; printfactor(d);}
d++;
}
} |
# 2016865, 2024-09-28 12:31:58, P-PTTPTPTPxTPxxxPP (44%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n; cin >> n;
int d = 2;
if(n<=2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d * d > n){
cout << n << " ";
}
else{
while(n%d==0){
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
return 0;
} | # 2017603, 2024-09-28 13:48:53, PTPTTPTPTPxTPxxxPP (44%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n; cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d * d > n){
cout << n << " ";
}
else{
while(n%d==0){
n/=d;
cout << d << " ";
}
d+=1;
}
}
}
return 0;
} | # 2017678, 2024-09-28 13:56:53, P-P--P-P-PxTP---PP (44%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n; cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){cout << n << " ";}
while(n%d==0){
n/=d;
cout << d << " ";
}
d+=1;
if(n<=1){break;}
}
}
return 0;
} | # 2017748, 2024-09-28 14:03:44, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n; cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){cout << n << " "; break;}
while(n%d==0){n/=d; cout << d << " ";}
d+=1;
}
}
return 0;
} | # 2017763, 2024-09-28 14:04:44, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n; cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){cout << n << " "; break;}
while(n%d==0){n/=d; cout << d << " ";}
d+=1;
if(n<=1){break;}
}
}
return 0;
} |
# 2017431, 2024-09-28 13:28:44, -PPPPPPPPPTTTTTT-- (50%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for number less than 2." << endl;
}
while (N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else if ( N%d == 0){
N /= d;
cout << d << " ";
}
else { d += 1; }
}
} | # 2017440, 2024-09-28 13:29:33, -PPPPPPPPPTTTTTT-- (50%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for number less than 2." << endl;
}
else{
while (N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else if ( N%d == 0){
N /= d;
cout << d << " ";
}
else { d += 1; }
}
}
} | # 2017570, 2024-09-28 13:43:31, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int64_t N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for number less than 2." << endl;
}
else {
while (N > 1){
if(d*d > N){
cout << N << " ";
break;
}
if ( N%d == 0 ){
N /= d;
cout << d << " ";
}
else { d += 1; }
}
}
} | # 2017575, 2024-09-28 13:44:16, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int64_t N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2." << endl;
}
else {
while (N > 1){
if(d*d > N){
cout << N << " ";
break;
}
if ( N%d == 0 ){
N /= d;
cout << d << " ";
}
else { d += 1; }
}
}
} |
# 2014866, 2024-09-28 09:11:22, PP--------------PP (22%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else if(N > 1){
if(d*d > N){
cout << N << " ";
}
else if(N % d == 0){
N /= d;
cout << d << " ";
}
else {
d += 1;
}
}
} | # 2014876, 2024-09-28 09:12:10, PP--------------PP (22%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else if(N > 1){
if(d*d > N){
cout << N << " ";
}
else if(N % d == 0){
N /= d;
cout << d << " ";
}
else {
d += 1;
}
}
} | # 2015396, 2024-09-28 10:02:09, PP--------------PP (22%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else if(N > 1){
if(d*d > N){
cout << N << " ";
}
else if(N % d == 0){
N /= d;
cout << d << " ";
}
else {
d += 1;
}
}
} | # 2015901, 2024-09-28 10:55:25, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
long long d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else if(N > 1){
for(int d=2; d <= N;){
if(N%d == 0){
cout << d << " ";
N/=d;
}else {
d++;
}
}
}
} |
# 2016957, 2024-09-28 12:39:42, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
void show(long long num)
{
int i = 2;
while (num > 1)
{
if (num % i == 0)
{
cout << i << " ";
num /= i;
}
else
{
i++;
}
}
}
int main()
{
long long num;
int d = 2;
cin >> num;
if (num < 2)
{
cout << "No prime factor for number less than 2";
}
else
{
while (num > 1)
{
if (d * d > num)
{
show(num);
return 0;
}
else
{
while (num % d == 0)
{
num /= d;
show(d);
}
d++;
}
}
}
return 0;
} | # 2016961, 2024-09-28 12:40:25, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
void show(long long num)
{
int i = 2;
while (num > 1)
{
if (num % i == 0)
{
cout << i << " ";
num /= i;
}
else
{
i++;
}
}
}
int main()
{
long long num;
int d = 2;
cin >> num;
if (num < 2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while (num > 1)
{
if (d * d > num)
{
show(num);
return 0;
}
else
{
while (num % d == 0)
{
num /= d;
show(d);
}
d++;
}
}
}
return 0;
} | # 2016967, 2024-09-28 12:40:49, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
void show(long long num)
{
int i = 2;
while (num > 1)
{
if (num % i == 0)
{
cout << i << " ";
num /= i;
}
else
{
i++;
}
}
}
int main()
{
long long num;
int d = 2;
cin >> num;
if (num < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (num > 1)
{
if (d * d > num)
{
show(num);
return 0;
}
else
{
while (num % d == 0)
{
num /= d;
show(d);
}
d++;
}
}
}
return 0;
} | # 2016975, 2024-09-28 12:41:55, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
void show(long long num)
{
long long i = 2;
while (num > 1)
{
if (num % i == 0)
{
cout << i << " ";
num /= i;
}
else
{
i++;
}
}
}
int main()
{
long long num;
long long d = 2;
cin >> num;
if (num < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while (num > 1)
{
if (d * d > num)
{
show(num);
return 0;
}
else
{
while (num % d == 0)
{
num /= d;
show(d);
}
d++;
}
}
}
return 0;
} |
# 2016901, 2024-09-28 12:34:57, PTPxTPTPTPTTTTTTPP (38%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while(N > 1){
if((d*d) > N){
cout << N << " ";
} else {
while( N % d == 0){
N /= d;
cout << d << " ";
}
d+=1;
continue;
}
}
}
} | # 2016945, 2024-09-28 12:38:38, PPPPPPPPPPTTTTTTPP (66%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while(N > 1){
if((d*d) > N){
cout << N << " ";
break;
} else {
while( N % d == 0){
N /= d;
cout << d << " ";
}
d+=1;
continue;
}
}
}
} | # 2016988, 2024-09-28 12:43:41, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while(N > 1){
if((d*d) > N){
cout << N << " ";
break;
} else {
while( N % d == 0){
N /= d;
cout << d << " ";
}
d+=1;
continue;
}
}
}
} | # 2017540, 2024-09-28 13:39:24, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while(N > 1){
if((d*d) > N){
cout << N << " ";
break;
} else {
while( N % d == 0){
N /= d;
cout << d << " ";
}
d+=1;
continue;
}
}
}
} |
# 2014952, 2024-09-28 09:18:53, -PPPPPPPPP-PP-PP-- (72%)
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main()
{
unsigned long long n;
cin >> n;
int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2";
}
else if (n > 1)
{
while (n > 1)
{
if (d * d > n)
{
cout << n << " ";
break;
}
else if (n % d == 0)
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
}
else
{
d++;
}
}
}
} | # 2014962, 2024-09-28 09:20:31, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main()
{
long long n;
cin >> n;
int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2";
}
else if (n > 1)
{
while (n > 1)
{
if (d * d > n)
{
cout << n << " ";
break;
}
else if (n % d == 0)
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
}
else
{
d++;
}
}
}
} | # 2014968, 2024-09-28 09:21:24, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main()
{
long n;
cin >> n;
int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else if (n > 1)
{
while (n > 1)
{
if (d * d > n)
{
cout << n << " ";
break;
}
else if (n % d == 0)
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
}
else
{
d++;
}
}
}
} | # 2015049, 2024-09-28 09:32:11, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main()
{
long n;
cin >> n;
int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else if (n > 1)
{
while (n > 1)
{
if (d * d > n)
{
cout << n << " ";
break;
}
else if (n % d == 0)
{
while (n % d == 0)
{
n /= d;
cout << d << " ";
}
}
else
{
d++;
}
}
}
} |
# 2016904, 2024-09-28 12:35:11, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d =2;
if(N <2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
if(N>1)
{
while(N >1)
{
if(d*d > N)
{
cout << N;
break;
}
else
{
if(N%d == 0)
{
while(N%d == 0)
{
N/=d;
cout << d << ' '; //
}
}
else
{
d+=1;
}
}
}
}
}
} | # 2017933, 2024-09-28 14:17:53, PPPPPPPPPP-PP-PP-- (77%)
#include<iostream>
using namespace std;
int main()
{
unsigned long long N;
cin >> N;
int d =2;
if(N <2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
if(N>1)
{
while(N >1)
{
if(d*d > N)
{
cout << N;
break;
}
else
{
if(N%d == 0)
{
while(N%d == 0)
{
N/=d;
cout << d << ' '; //
}
}
else
{
d+=1;
}
}
}
}
}
} | # 2017936, 2024-09-28 14:18:04, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d =2;
if(N <2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
if(N>1)
{
while(N >1)
{
if(d*d > N)
{
cout << N;
break;
}
else
{
if(N%d == 0)
{
while(N%d == 0)
{
N/=d;
cout << d << ' '; //
}
}
else
{
d+=1;
}
}
}
}
}
} | # 2018682, 2024-09-28 15:15:32, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d =2;
if(N <2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
if(N>1)
{
while(N >1)
{
if(d*d > N)
{
cout << N;
break;
}
else
{
if(N%d == 0)
{
while(N%d == 0)
{
N/=d;
cout << d << ' '; //
}
}
else
{
d+=1;
}
}
}
}
}
} |
# 2016979, 2024-09-28 12:42:29, -TTTTTTTTTxxxxxx-- (0%)
#include <iostream>
using namespace std;
int main(){
int N;
cin>>N;
int d=2;
if (N<2){
cout <<"No prime factors for numbers less than 2";
}
else{
while(N>1){
while(d*d<N){
if(N%d==0){
N/=d;
cout <<d<<" ";
}
else {
d+=1;
cout<<d<<" ";
}
}
}
}
} | # 2017352, 2024-09-28 13:20:48, P---------------PP (16%)
#include <iostream>
using namespace std;
int main(){
int N;
cin>>N;
if (N<2){
cout <<"No prime factors for numbers less than 2.";
}
} | # 2018727, 2024-09-28 15:17:00, P-PPPPPPPPTTTTTTPP (61%)
#include <iostream>
using namespace std;
int main(){
int N;
cin>>N;
int d=2;
int copy=N;
if(N>2){
while(copy>1){
if(d*d>copy){
cout <<copy;
break;
}
else{
if(copy%d==0){
copy/=d;
cout <<d<<" ";
}
else{
d+=1;
}
}
}
}
else if (N<2){
cout <<"No prime factors for numbers less than 2.";
}
} | # 2018822, 2024-09-28 15:19:39, P-PPPPPPPPPPPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin>>N;
long long d=2;
long long copy=N;
if(N>2){
while(copy>1){
if(d*d>copy){
cout <<copy;
break;
}
else{
if(copy%d==0){
copy/=d;
cout <<d<<" ";
}
else{
d+=1;
}
}
}
}
else if (N<2){
cout <<"No prime factors for numbers less than 2.";
}
} |
# 2016852, 2024-09-28 12:30:41, Compilation error (0%)
#include <iostream>
#include <cmath>
int main(){
long long N;
cin >> N;
int d = 2;
int component1 = 0;
int component2 = 0;
if(N < 2){
cout << "No prime factors for number less than 2"
return 0;
}
do{
if(N%d == 0){
cout << component1 << component2;
}
else{
d+=1
}
}while(d*d > N)
cout << component1 << component2;
} | # 2017057, 2024-09-28 12:50:39, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long N;
cin >> N;
int d = 2;
int component = 0;
if(N < 2){
cout << "No prime factors for number less than 2";
return 0;
}
while(N > 1){
if(d*d > N){
cout << N;
break;
}
else{
if(N % d == 0){
N/=d;
cout << d << " ";
}
else{
d+=1;
}
}
}
} | # 2017516, 2024-09-28 13:37:22, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long N;
cin >> N;
int d = 2;
int component = 0;
if(N < 2){
cout << "No prime factors for number less than 2.";
return 0;
}
while(N > 1){
if(d*d > N){
cout << N;
break;
}
else{
if(N % d == 0){
N/=d;
cout << d << " ";
}
else{
d+=1;
}
}
}
} | # 2017524, 2024-09-28 13:38:03, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long N;
cin >> N;
int d = 2;
int component = 0;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
while(N > 1){
if(d*d > N){
cout << N;
break;
}
else{
if(N % d == 0){
N/=d;
cout << d << " ";
}
else{
d+=1;
}
}
}
} |
# 2014900, 2024-09-28 09:13:32, -TPTTPTPTPxTPxxx-- (27%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(n>1){
if(d*d>n){cout<<n<<' ';}
else{
while(n%d==0){
n/=d;
cout<<d<<' ';
}
if(n%d!=0){d+=1;}
}
}
}
} | # 2014919, 2024-09-28 09:15:30, -PPPPPPPPPPTPPPP-- (77%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(n>1){
if(d*d>n){cout<<n<<' '; break;}
else{
while(n%d==0){
n/=d;
cout<<d<<' ';
}
if(n%d!=0){d+=1;}
}
}
}
} | # 2015150, 2024-09-28 09:40:40, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){cout<<n<<' '; break;}
else{
while(n%d==0){
n/=d;
cout<<d<<' ';
}
if(n%d!=0){d+=1;}
}
}
}
} | # 2015709, 2024-09-28 10:33:39, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){cout<<n<<' '; break;}
else{
while(n%d==0){
n/=d;
cout<<d<<' ';
}
if(n%d!=0){d+=1;}
}
}
}
} |
# 2015405, 2024-09-28 10:02:30, P-T-TT-TTTTTTTTTPT (11%)
#include <bits//stdc++.h>
using namespace std;
int main(){
int d = 2;
int N ;
cin >> N ;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
do{if(N>1){
if(d*d<=N){
while(N%d==0){
N/=d;
int i=2;
while(i<=d){
if(d%i==0){
d /= i;
cout << i << " ";
}
}
}
} d+=1;
} for(int div=2;div*div<=N;div++){
if(N%div==0){
N /= div;
cout << div << " ";
}
}
}while(N%d==0);
} | # 2015581, 2024-09-28 10:19:53, PPTPTTPTTTTTTTTTPT (27%)
#include <bits//stdc++.h>
using namespace std;
int main(){
int d = 2;
int N ;
cin >> N ;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
do{if(N>1){
if(d*d<=N){
while(N%d==0){
N/=d;
int i=2;
while(i<=d){
if(d%i==0){
d /= i;
cout << i << " ";
}
i++;
}
} d+=1;
}
int f =2 ;
while(f<=N){
if(N%f==0){
N/= f;
cout << f << " ";
}
f++;
}
}
}while(N%d==0);
} | # 2015752, 2024-09-28 10:38:39, PTPTTPTPTPTTTTTTP- (33%)
#include <bits//stdc++.h>
using namespace std;
int main(){
int d = 2;
int N ;
cin >> N ;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
while(N>1){
if(d*d<=N){
while(N%d==0){
N/=d;
cout << d << " ";
} d++;
}
}while(N%d==0){
N/=d;
cout << d << " ";
} d++;
} | # 2015891, 2024-09-28 10:54:21, PPPPPPPPPPPTPPPPPP (94%)
#include <bits//stdc++.h>
using namespace std;
int main(){
long long int d = 2;
long long int N ;
cin >> N ;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
while(N>1){
if(d*d<=N){
while(N%d==0){
N/=d;
cout << d << " ";
} d++;
} while(N%d==0){
N/=d;
cout << d << " ";
} d++;
}
} |
# 2016919, 2024-09-28 12:36:29, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main(){
long long n, d=2;
cin >> n;
if(n < 2){
cout << "No prime factors for number less than 2";
}
else{
while(n > 1){
if(d*d > n){
long long i = 2;
while(n != 1){
while(n % i == 0){
cout << i << ' ';
n /= i;
} i++;
}
}
else{
while(n % d == 0){
n /= d;
cout << d << ' ';
}
d += 1;
}
}
}
return 0;
} | # 2016980, 2024-09-28 12:42:31, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main(){
long long n, d=2;
cin >> n;
if(n < 2){
cout << "No prime factors for number less than 2";
}
else{
while(n > 1){
if(d*d > n){
long long i = 2;
while(n != 1){
while(n % i == 0){
cout << i << ' ';
n /= i;
} i++;
}
}
else{
if(n%d == 0){
while(n % d == 0){
n /= d;
cout << d << ' ';
}
}
d++;
}
}
}
return 0;
} | # 2017526, 2024-09-28 13:38:32, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main(){
long long n, d=2;
cin >> n;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n > 1){
if(d*d > n){
long long i = 2;
while(n != 1){
while(n % i == 0){
cout << i << ' ';
n /= i;
} i++;
}
}
else{
if(n%d == 0){
while(n % d == 0){
n /= d;
cout << d << ' ';
}
}
d++;
}
}
}
return 0;
} | # 2017534, 2024-09-28 13:39:01, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long n, d=2;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
long long i = 2;
while(n != 1){
while(n % i == 0){
cout << i << ' ';
n /= i;
} i++;
}
}
else{
if(n%d == 0){
while(n % d == 0){
n /= d;
cout << d << ' ';
}
}
d++;
}
}
}
return 0;
} |
# 2015906, 2024-09-28 10:55:41, -TPTTPTPTPxxPxxx-- (27%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
long long d = 2;
cin >> n;
if (n >= 2) {
while (n > 1) {
if (d*d > n) {
cout << n << " ";
}
else {
while (n % d == 0) {
n = n / d;
cout << d << " ";
}
d += 1;
}
}
}
else cout << "No prime factors for number less than 2.";
} | # 2015993, 2024-09-28 11:01:59, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
long long d = 2;
bool b = false;
cin >> n;
if (n >= 2) {
for (long long d = 2; d <= n; d++) {
if (n % d == 0) {
n = n / d;
cout << d << " ";
d--;
}
}
}
else cout << "No prime factors for number less than 2.";
/*if (n >= 2) {
while (n > 1) {
if (d*d > n) {
cout << n << " ";
}
else {
while (n % d == 0) {
n = n / d;
cout << d << " ";
}
d += 1;
}
}
}
else cout << "No prime factors for number less than 2.";*/
} | # 2016007, 2024-09-28 11:03:22, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
long long d = 2;
bool b = false;
cin >> n;
if (n >= 2) {
for (long long d = 2; d <= n; d++) {
if (n % d == 0) {
n = n / d;
cout << d << " ";
d--;
}
}
}
else cout << "No prime factors for numbers less than 2.";
/*if (n >= 2) {
while (n > 1) {
if (d*d > n) {
cout << n << " ";
}
else {
while (n % d == 0) {
n = n / d;
cout << d << " ";
}
d += 1;
}
}
}
else cout << "No prime factors for number less than 2.";*/
} | # 2016026, 2024-09-28 11:05:16, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
if (n >= 2) {
for (long long d = 2; d <= n; d++) {
if (n % d == 0) {
n = n / d;
cout << d << " ";
d--;
}
}
}
else cout << "No prime factors for numbers less than 2.";
/*if (n >= 2) {
while (n > 1) {
if (d*d > n) {
cout << n << " ";
}
else {
while (n % d == 0) {
n = n / d;
cout << d << " ";
}
d += 1;
}
}
}
else cout << "No prime factors for number less than 2.";*/
} |
# 2016909, 2024-09-28 12:35:41, PTPTTTTTTPTTTTTTPP (27%)
#include<iostream>
using namespace std;
int main(){
long int k;
cin >> k;
int d = 2;
if (k < 2)
{
cout << "No prime factors for numbers less than 2.";
} else {
while (k>1)
{
if (d*d>k)
{
cout <<k<<" ";
} else{
while(k%d == 0){
if (k%d == 0)
{
k/=d;
cout <<d<<" ";
} else{
d+=1;
}
}
}
}
}
} | # 2016948, 2024-09-28 12:38:47, PTPTTPTPTPxTPxxxPP (44%)
#include<iostream>
using namespace std;
int main(){
long int k;
cin >> k;
int d = 2;
if (k < 2)
{
cout << "No prime factors for numbers less than 2.";
} else {
while (k>1)
{
if (d*d>k)
{
cout <<k<<" ";
} else{
while(k%d == 0){
k/=d;
cout <<d<<" ";
}
d+=1;
}
}
}
} | # 2016966, 2024-09-28 12:40:45, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long int k;
cin >> k;
int d = 2;
if (k < 2)
{
cout << "No prime factors for numbers less than 2.";
} else {
while (k>1)
{
if (d*d>k)
{
cout <<k<<" ";
break;
} else{
while(k%d == 0){
k/=d;
cout <<d<<" ";
}
d+=1;
}
}
}
} |
# 2015927, 2024-09-28 10:57:03, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
break;
}
else{
if(n%d==0){
n=n/d;
cout<<d<<" ";
}
else d++;
}
}
return 0;
} | # 2016729, 2024-09-28 11:57:51, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}
else{
if(n%d==0){
n=n/d;
cout<<d<<" ";
}
else d++;
}
}
} | # 2016744, 2024-09-28 11:58:12, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
int d=2;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
while(n>1){
if(d*d>n){
cout<<n;
return 0;
}
else{
if(n%d==0){
n=n/d;
cout<<d<<" ";
}
else d++;
}
}
return 0;
} |
# 2014887, 2024-09-28 09:12:48, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std ;
int main(){
long long n ;
cin >> n;
long long d =2 ;
if(n<2){
cout << "No prime factors for numbers less than 2." ;
}else{
while( d <= n){
if(n%d == 0){
cout << d << ' ' ;
n/=d ;
}else{
d++;
}
}
}
} | # 2014913, 2024-09-28 09:14:43, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std ;
int main(){
long long n ;
cin >> n;
long long d =2 ;
if(n<2){
cout << "No prime factors for numbers less than 2." ;
}else{
while( d <= n){
if(n%d == 0){
cout << d << ' ' ;
n/=d ;
}else{
d++;
}
}
}
} | # 2015051, 2024-09-28 09:32:13, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std ;
int main(){
long long n ;
cin >> n;
long long d =2 ;
if(n<2){
cout << "No prime factors for numbers less than 2." ;
}else{
while( d <= n){
if(n%d == 0){
cout << d << ' ' ;
n/=d ;
}else{
d++;
}
}
}
} |
# 2015094, 2024-09-28 09:34:21, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n ;
int d=2;
cin>> n ;
if(n<2){
cout<< "No prime factors for numbers less than 2.";
}
else{
while(n>1) {
if(d*d >n){
cout<< n ;
return 0;
}
else {
while(n%d == 0){
n/=d;
cout<< d << " " ;
}
d+=1 ;
}
}
}
} | # 2015401, 2024-09-28 10:02:20, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n ;
int d=2;
cin>> n ;
if(n<2){
cout<< "No prime factors for numbers less than 2.";
}
else{
while(n>1) {
if(d*d >n){
cout<< n ;
return 0;
}
else {
while(n%d == 0){
n/=d;
cout<< d << " " ;
}
d+=1 ;
}
}
}
} | # 2016168, 2024-09-28 11:19:55, PPPPPPPPPPPTPPPPPP (94%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n ;
int d=2;
cin>> n ;
if(n<2){
cout<< "No prime factors for numbers less than 2.";
}
else{
while(n>1) {
if(d*d >n){
cout<< n ;
return 0;
}
else {
while(n%d == 0){
n/=d;
cout<< d << " " ;
}
d+=1 ;
}
}
}
} |
# 2014912, 2024-09-28 09:14:42, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
int d =2;
if(N < 2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while(N > 1)
{
if(d*d > N)
{
cout << N <<' ';
break;
}
else{
if(N % d == 0)
{
N /= d;
cout << d <<' ';
}
else
{
d += 1;
continue;
}
}
}
}
} | # 2014933, 2024-09-28 09:16:57, -PPPPPPPPP-PP-PP-- (72%)
#include <iostream>
using namespace std;
int main()
{
unsigned long long N;
cin >> N;
//cout << N;
int d =2;
if(N < 2)
{
cout << "No prime factors for numbers less than 2";
}
else
{
while(N > 1)
{
if(d*d > N)
{
cout << N <<' ';
break;
}
else{
if(N % d == 0)
{
N /= d;
cout << d <<' ';
}
else
{
d += 1;
continue;
}
}
}
}
} | # 2015161, 2024-09-28 09:41:09, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main()
{
long long N;
cin >> N;
//cout << N;
int d =2;
if(N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(N > 1)
{
if(d*d > N)
{
cout << N <<' ';
break;
}
else{
if(N % d == 0)
{
N /= d;
cout << d <<' ';
}
else
{
d += 1;
continue;
}
}
}
}
} |
# 2014973, 2024-09-28 09:22:02, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long n;cin>>n;
int d = 2;
bool loop = true ;
if(n<2){
cout<<"No prime factors for numbers less than 2." ;
}
else if(n>1){
while (loop){
if(d*d<=n){
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d+=1;
}
else {
loop = false;
}
}
}
if(n>1){
cout<<n;
}
} | # 2014976, 2024-09-28 09:22:14, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long n;cin>>n;
int d = 2;
bool loop = true ;
if(n<2){
cout<<"No prime factors for numbers less than 2." ;
}
else if(n>1){
while (loop){
if(d*d<=n){
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d+=1;
}
else {
loop = false;
}
}
}
if(n>1){
cout<<n;
}
} | # 2015991, 2024-09-28 11:01:52, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long n;cin>>n;
int d = 2;
bool loop = true ;
if(n<2){
cout<<"No prime factors for numbers less than 2." ;
}
else if(n>1){
while (loop){
if(d*d<=n){
while(n%d==0){
n/=d;
cout<<d<<' ';
}
d+=1;
}
else {
loop = false;
}
}
}
if(n>1){
cout<<n;
}
} |
# 2017390, 2024-09-28 13:25:23, PTPTTPTPTPTTPTTTPP (44%)
#include<bits/stdc++.h>
using namespace std;
//deque <int> q;
void primeey(long long int n){
while(n%2==0){
cout<<2<<" ";
n=n/2;
}
for(int i=3;i<n/2;i+=2){
while(n%i==0){
cout<<i<<" ";
n=n/i;
}
}
if(n!=1){
cout<<n<<" ";
}
}
int main(){
long long int n; cin>>n;
long long int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
primeey(n);
}
else{
while(n%d==0){
n/=d;
primeey(d);
}
if(n%d!=0){
d+=1;
}
}
}
}
return 0;
} | # 2017407, 2024-09-28 13:26:37, PTPxTPTPTPTTPTTTPP (44%)
#include<bits/stdc++.h>
using namespace std;
//deque <int> q;
void primeey(long long int n){
while(n%2==0){
cout<<2<<" ";
n=n/2;
}
for(int i=3;i<n/2;i+=2){
while(n%i==0){
cout<<i<<" ";
n=n/i;
}
}
if(n!=1){
cout<<n<<" ";
}
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
long long int n; cin>>n;
long long int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
primeey(n);
}
else{
while(n%d==0){
n/=d;
primeey(d);
}
if(n%d!=0){
d+=1;
}
}
}
}
return 0;
} | # 2018036, 2024-09-28 14:26:21, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
//deque <int> q;
void primeey(long long int n){
while(n%2==0){
cout<<2<<" ";
n=n/2;
}
for(int i=3;i<n/2;i+=2){
while(n%i==0){
cout<<i<<" ";
n=n/i;
}
}
if(n>1){
cout<<n<<" ";
}
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
long long int n; cin>>n;
long long int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
primeey(n);
return 0;
}
else{
if(n%d==0){
while(n%d==0){
n/=d;
primeey(d);
}
}
else{
d+=1;
}
}
}
}
return 0;
} |
# 2015210, 2024-09-28 09:44:46, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else if(d*d > N){
if(N == 2)cout << 2;
if(N == 3)cout << 3;
}else{
while(N > 1){
if(d*d > N){
cout << N;
break;
}
else if(N%d == 0){
cout << d << " ";
N = N/d;
}else if(N%d != 0){
d++;
}
}
}
} | # 2015213, 2024-09-28 09:45:02, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else if(d*d > N){
if(N == 2)cout << 2;
if(N == 3)cout << 3;
}else{
while(N > 1){
if(d*d > N){
cout << N;
break;
}
else if(N%d == 0){
cout << d << " ";
N = N/d;
}else if(N%d != 0){
d++;
}
}
}
} | # 2015721, 2024-09-28 10:34:31, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else if(d*d > N){
if(N == 2)cout << 2;
if(N == 3)cout << 3;
}else{
while(N > 1){
if(d*d > N){
cout << N;
break;
}
else if(N%d == 0){
cout << d << " ";
N = N/d;
}else if(N%d != 0){
d++;
}
}
}
} |
# 2015533, 2024-09-28 10:15:20, PP--------------PP (22%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int N, d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}else if(N > 1){
if(d*d > N){
for(int d = 2; d <= N; d++){
while(N % d == 0){
N = N/d;
cout << d;
if(N > 1){
cout << " ";
}
return 0;
}
}
}
}else if(N % d == 0){
while(N % d == 0){
N /= d;
for(int d = 2; d <= N; d++){
while(N % d == 0){
N = N/d;
cout << N;
if(N > 1){
cout << " ";
}
return 0;
}
}
}
}else{
while(N % d != 0){
d += 1;
return 0;
}
}
} | # 2016027, 2024-09-28 11:05:29, PPPPPPPPPPPPP-PPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int N, d = 2;
cin >> N;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}else if(N > 1){
if(d*d > N){
for(int d = 2; d <= N; d++){
while(N % d == 0){
N = N/d;
cout << d;
if(N > 1){
cout << " ";
}
}
}
}else if(N % d == 0){
for(int d = 2; d <= N; d++){
while(N % d == 0){
N = N/d;
cout << d;
if(N > 1){
cout << " ";
}
}
}
}else if(N % d != 0){
cout << N;
}
}
} |
# 2017041, 2024-09-28 12:49:10, PP-PP-P-P-PT-PPPPP (66%)
#include<iostream>
#include<cmath>
int main ( ){
long long n = 0 ;
std::cin >> n ;
int d = 2 ;
if ( n < 2 ) {
std::cout << "No prime factors for numbers less than 2." ;
}else {
if ( n >= 1 ){
while ( n >= 1 ){
if ( d*d > n ){
std::cout << n << " " ;
break;
}else {
bool aa = true ;
while ( aa ){
if ( n%d == 0 ){
n /= d ;
std::cout << d << " " ;
}else {
d += 1 ;
aa = false ;
}
}
}
}
}else
std::cout << n ;
}
} | # 2017119, 2024-09-28 12:57:38, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
#include<cmath>
int main ( ){
long long n = 0 ;
std::cin >> n ;
int d = 2 ;
if ( n < 2 ) {
std::cout << "No prime factors for numbers less than 2." ;
}else {
while ( n > 1 ){
if ( d*d > n ){
std::cout << n << " " ;
break;
}else {
bool aa = true ;
while ( aa ){
if ( n%d == 0 ){
n /= d ;
std::cout << d << " " ;
}else {
d += 1 ;
aa = false ;
}
}
}
}
}
} |
# 2014853, 2024-09-28 09:10:40, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n;
int d = 2;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
cout << n;
return 0;
}
else{
while(n%d == 0){
n /=d;
cout << d << " ";
}
d +=1;
}
}
}
} | # 2014864, 2024-09-28 09:11:12, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n;
int d = 2;
cin >> n;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d*d > n){
cout << n;
return 0;
}
else{
while(n%d == 0){
n /=d;
cout << d << " ";
}
d +=1;
}
}
}
} |
# 2014908, 2024-09-28 09:13:58, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d * d > n){
cout << n << " ";
break;
}
else{
if(n % d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
}
} | # 2015080, 2024-09-28 09:33:40, PPPPPPPPPPPTPPPPPP (94%)
#include <iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n > 1){
if(d * d > n){
cout << n << " ";
break;
}
else{
if(n % d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
}
} |
# 2017026, 2024-09-28 12:47:50, PPPPPPPPPPPTPPPPPP (94%)
#include <vector>
#include <algorithm>
#include <iostream>
#include <cctype>
#include <cmath>
#include <stdio.h>
using namespace std;
int main()
{
long long n;
cin >> n;
int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2." << endl;
return 0;
}
while (true)
{
if (n > 1)
{
if (d * d > n)
{
// cout smt
//cout << "this is N" <<endl;
cout << n << " ";
break;
}
else
{
while (true)
{
if (n % d == 0)
{
n /= d;
// cout smt
// cout << "this is D" <<endl;
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
break;
}
}
} |
# 2015090, 2024-09-28 09:34:06, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >>n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}else{
while(1){
if(n>1){
if(d*d>n){
cout << n << " ";
break;
}else{
while(1){
if(n%d==0){
n/=d;
cout << d <<" ";
continue;
}else{
d+=1;
break;
}
}
}
}else{
break;
}
}
}
} |
# 2014931, 2024-09-28 09:16:32, PPPPPPPPPPPTPPPPPP (94%)
#include<iostream>
using namespace std;
int main() {
long long N;
int d =2;
cin >> N;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N>1){
if(d*d>N){
cout << N << ' ';
break;
}else{
while(N%d==0){
N/=d;
cout << d << ' ';
}
if(N%d!=0){d+=1;}
}
}
}
} |
# 2014868, 2024-09-28 09:11:25, PPPPPPPPPPPTPPPPPP (94%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
while(n>1){
if(d*d>n){
cout<<n<<" ";
return 0;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
} |
# 2016986, 2024-09-28 12:43:28, -PPPPPPPPP-PP-PP-- (72%)
#include <iostream>
using namespace std;
int main() {
unsigned long long n; cin >> n;
int d = 2;
if(n < 2) {
cout << "No prime factors for numbers less than 2";
} else {
do {
if(n > 1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
do {
if(n%d == 0) {
n /= d;
cout << d << " ";
} else {
break;
}
} while(n%d == 0);
if(n%d != 0) d+=1;
}
} else break;
} while(n > 1);
}
} | # 2017003, 2024-09-28 12:46:09, -PPPPPPPPP-PP-PP-- (72%)
#include <iostream>
using namespace std;
int main() {
unsigned long long n; cin >> n;
int d = 2;
if(n < 2) {
cout << "No prime factors for numbers less than 2";
} else {
do {
if(n > 1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
do {
if(n%d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
}
} while(n%d == 0);
if(n%d != 0) d+=1;
}
} else break;
} while(n > 1);
}
} | # 2017023, 2024-09-28 12:47:40, -PPPPPPPPP-PP-PP-- (72%)
#include <iostream>
using namespace std;
int main() {
unsigned long long n; cin >> n;
int d = 2;
if(n < 2) {
cout << "No prime factors for numbers less than 2";
} else {
do {
if(n > 1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
do {
if(n%d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
break;
}
} while(n%d == 0);
if(n%d != 0) d+=1;
}
} else break;
} while(n > 1);
}
} | # 2017038, 2024-09-28 12:49:00, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main() {
unsigned long long n; cin >> n;
unsigned long long d = 2;
if(n < 2) {
cout << "No prime factors for numbers less than 2";
} else {
do {
if(n > 1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
do {
if(n%d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
break;
}
} while(n%d == 0);
if(n%d != 0) d+=1;
}
} else break;
} while(n > 1);
}
} | # 2017317, 2024-09-28 13:18:07, PPPPPPPPPPPPPPPP-- (88%)
#include <iostream>
using namespace std;
int main() {
unsigned long long n; cin >> n;
unsigned long long d = 2;
if(n < 2) {
cout << "No prime factors for numbers less than 2.";
} else {
do {
if(n > 1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
do {
if(n%d == 0) {
n /= d;
cout << d << " ";
} else {
d += 1;
break;
}
} while(n%d == 0);
if(n%d != 0) d+=1;
}
} else break;
} while(n > 1);
}
} | # 2017333, 2024-09-28 13:19:09, PPPPPPPPPPPPPPPP-- (88%)
#include <iostream>
using namespace std;
int main() {
unsigned long long n; cin >> n;
unsigned long long d = 2;
if(n < 2) {
cout << "No prime factors for numbers less than 2.";
} else {
do {
if(n > 1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
do {
if(n%d == 0) {
n /= d;
cout << d << " ";
} else {
//d += 1;
break;
}
} while(n%d == 0);
if(n%d != 0) d+=1;
}
} else break;
} while(n > 1);
}
} | # 2018736, 2024-09-28 15:17:12, PPPPPPPPPPPPPPPP-- (88%)
#include <iostream>
using namespace std;
int main() {
unsigned long long n; cin >> n;
unsigned long long d = 2;
if(n < 2) {
cout << "No prime factors for numbers less than 2.";
} else {
do {
if(n > 1) {
if(d*d > n) {
cout << n << " ";
break;
} else {
do {
if(n%d == 0) {
n /= d;
cout << d << " ";
} else {
//d += 1;
break;
}
} while(n%d == 0);
if(n%d != 0) d+=1;
}
} else break;
} while(n > 1);
}
} |
# 2014848, 2024-09-28 09:10:19, P-P--P-P-P--P---PP (44%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long d=2;
if (N>2){
while (N>1){
if(d*d>N){
cout << d;
break;
} else{
if(N%d ==0){
N/=d;
cout << d << " ";
} else{
d++;
}
}
}
} else{
cout << "No prime factors for numbers less than 2.";
}
} | # 2014907, 2024-09-28 09:13:58, P-PPPPPPPPPTPPPPPP (88%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long d=2;
if (N>2){
while (N>1){
if(d >=N){
cout << d<<endl;
break;
} else{
if(N%d ==0){
N/=d;
cout << d << " ";
} else{
d++;
}
}
}
} else{
cout << "No prime factors for numbers less than 2.";
}
} |
# 2017331, 2024-09-28 13:19:04, PPPPPPPPPP-PP-PP-- (77%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
unsigned long long int n;
int d;
cin >> n;
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
// cout prime n
cout << n << " ";
break;
}
else{
while(n%d==0){
n/=d;
// cout prime d
cout << d << " ";
}
d+=1;
}
}
}
} | # 2017354, 2024-09-28 13:20:59, PPPPPPPPPPPPPPPP-- (88%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
unsigned long long int n;
unsigned long long int d;
cin >> n;
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
// cout prime n
cout << n << " ";
break;
}
else{
while(n%d==0){
n/=d;
// cout prime d
cout << d << " ";
}
d+=1;
}
}
}
} |
# 2015342, 2024-09-28 09:57:11, ------------------ (0%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
int ans;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n<=1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
}
else{
while( n%d > 0){
if(n%d == 0){
n /= d;
cout << d;
}
}
}
}
}
} | # 2015348, 2024-09-28 09:57:33, ------------------ (0%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
int ans;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n<=1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
}
else{
while( n%d > 0){
if(n%d == 0){
n /= d;
cout << d << " ";
}
}
}
}
}
} | # 2015415, 2024-09-28 10:02:59, -P-P--P----P------ (22%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>=1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
while(n%d > 0){
if(n%d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
}
else{
break;
}
}
}
} | # 2015431, 2024-09-28 10:04:40, -PTTTTTTTTTTTTTT-- (5%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>=1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
}
else{
break;
}
}
}
} | # 2015434, 2024-09-28 10:05:17, -PTTTTTTTTTTTTTT-- (5%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>=1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
while(n >= 0){
if(n%d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
}
else{
break;
}
}
}
} | # 2015442, 2024-09-28 10:06:48, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>=1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
if(n%d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
else{
break;
}
}
}
} | # 2015461, 2024-09-28 10:08:56, -P-P--P----P------ (22%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>=1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
while(n%d > 0){
if(n%d == 0){
n /= d;
cout << d << " ";
}
}
if(n%d > 0){
d+= 1;
}
}
}
else{
break;
}
}
}
} | # 2015467, 2024-09-28 10:09:20, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>=1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
if(n%d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
else{
break;
}
}
}
} | # 2015471, 2024-09-28 10:10:01, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
if(n%d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
else{
break;
}
}
}
} | # 2015486, 2024-09-28 10:11:21, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
if(n%d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
while(n%d > 0){
if(n%d == 0){
n /= d;
cout << d << " ";
}
}
}
}
else{
break;
}
}
}
} | # 2015499, 2024-09-28 10:12:40, -PPP--P--P-T------ (27%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
if(n%d == 0){
n /= d;
cout << d << " ";
while(n%d > 0){
n/= d;
cout << d << "";
}
}
else{
d += 1;
}
}
}
else{
break;
}
}
}
} | # 2015502, 2024-09-28 10:13:05, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
if(n%d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
else{
break;
}
}
}
} | # 2015521, 2024-09-28 10:14:37, -PPPPPPPPPPPPPPP-- (83%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while(n>1){
if(n>1){
if(d*d > n){
cout << n << " ";
break;
}
else{
if(n%d == 0){
n /= d;
cout << d << " ";
}
else{
d += 1;
}
}
}
else{
break;
}
}
}
} |
# 2017157, 2024-09-28 13:03:11, Compilation error (0%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n ;
int d = 2 ;
int k = 2 ;
int j = 2 ;
cin >> n ;
if(n < 2) { cout << "No prime factors for numbers less than 2" ; }
else {
while( n > 1 ) {
if(d*d > n){
//show tao prakob n
break;
} else {
while (true)
}
}
}
} | # 2017168, 2024-09-28 13:04:35, Compilation error (0%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n ;
int d = 2 ;
int k = 2 ;
int j = 2 ;
cin >> n ;
if(n < 2) { cout << "No prime factors for numbers less than 2" ; }
else {cout << n ; }
}
}
} | # 2017173, 2024-09-28 13:04:56, -P-P--P----------- (16%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n ;
int d = 2 ;
int k = 2 ;
int j = 2 ;
cin >> n ;
if(n < 2) { cout << "No prime factors for numbers less than 2" ; }
else {cout << n ; }
} | # 2017210, 2024-09-28 13:08:37, -PPPPPPPPPTTTTTTTT (50%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n ;
int d = 2 ;
cin >> n ;
if(n < 2) { cout << "No prime factors for numbers less than 2" ; }
while (n != 1) {
while(n%d != 0) {
d++ ;
}
n /= d ;
cout << d << " " ;
}
} | # 2017256, 2024-09-28 13:12:02, -PPPPPPPPPPTPPPPTT (77%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long int n ;
long long int d = 2 ;
cin >> n ;
if(n < 2) { cout << "No prime factors for numbers less than 2" ; }
while (n != 1) {
while(n%d != 0) {
d++ ;
}
n /= d ;
cout << d << " " ;
}
} | # 2017519, 2024-09-28 13:37:28, -PPPPPPPPPPTPPPPTT (77%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long int n ;
int d = 2 ;
cin >> n ;
if(n < 2.) { cout << "No prime factors for numbers less than 2" ; }
while (n != 1) {
while(n%d != 0) {
d++ ;
}
n /= d ;
cout << d << " " ;
}
} | # 2018015, 2024-09-28 14:24:43, PPPPPPPPPPPTPPPPTT (83%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long int n ;
int d = 2 ;
cin >> n ;
if(n < 2.) { cout << "No prime factors for numbers less than 2." ; }
while (n != 1) {
while(n%d != 0) {
d++ ;
}
n /= d ;
cout << d << " " ;
}
} | # 2018048, 2024-09-28 14:28:12, Compilation error (0%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
double n ;
double d = 2 ;
cin >> n ;
if(n < 2.) { cout << "No prime factors for numbers less than 2." ; }
while (n != 1) {
while(n%d != 0) {
d++ ;
}
n /= d ;
cout << d << " " ;
}
} | # 2018053, 2024-09-28 14:28:51, PPPPPPPPPPPTPPPPTT (83%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long int n ;
long long int d = 2 ;
cin >> n ;
if(n < 2.) { cout << "No prime factors for numbers less than 2." ; }
while (n != 1) {
while(n%d != 0) {
d++ ;
}
n /= d ;
cout << d << " " ;
}
} |
# 2015060, 2024-09-28 09:33:01, -T---------------- (0%)
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int d=2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
} else {
while (N > 1) {
if (d*d > N) {
cout << N;
} else {
while (N%d==0) {
N /= d;
cout << d;
} if (N%d !=0) {
d += 1;
break;
}
}
}
}
} | # 2015082, 2024-09-28 09:33:45, Compilation error (0%)
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int d=2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
} else {
while (N > 1) {
if (d*d > N) {
cout << N;
} else {
while (N%d==0) {
N /= d;
cout << d;
} if (N%d !=0) {
d += 1;
break;
}
}
} if (N <= 1) {
break;
}
}
} | # 2015112, 2024-09-28 09:36:07, -T---------------- (0%)
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int d=2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
} else {
while (N > 1) {
if (d*d > N) {
cout << N;
} else {
while (N%d==0) {
N /= d;
cout << d;
} if (N%d !=0) {
d += 1;
break;
}
}
}
}
} | # 2015211, 2024-09-28 09:44:47, PT--------------PP (16%)
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int d=2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
} else {
while (N > 1) {
if (d*d > N) {
cout << N;
} else {
while (N%d==0) {
N /= d;
cout << d;
} if (N%d !=0) {
d += 1;
break;
}
}
}
}
} | # 2016356, 2024-09-28 11:36:18, -TPTTPTPTPTTTTTT-- (22%)
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int d=2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
} else {
while (N > 1) {
if (d*d > N) {
cout << N << " ";
} else {
while (N%d==0) {
N /= d;
cout << d << " ";
} if (N%d !=0) {
d += 1;
}
}
}
}
} | # 2016696, 2024-09-28 11:56:24, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int d=2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
} else {
while (N > 1) {
if (d*d > N) {
cout << N << " ";
break;
} else {
while (N%d==0) {
N /= d;
cout << d << " ";
}
if (N%d !=0) {
d += 1;
}
}
}
}
} | # 2016704, 2024-09-28 11:56:47, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
int d=2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
} else {
while (N > 1) {
if (d*d > N) {
cout << N << " ";
break;
} else {
while (N%d==0) {
N /= d;
cout << d << " ";
break;
}
if (N%d !=0) {
d += 1;
}
}
}
}
} | # 2016738, 2024-09-28 11:58:00, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main() {
long long N;
cin >> N;
int d=2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
} else {
while (N > 1) {
if (d*d > N) {
cout << N << " ";
break;
} else {
while (N%d==0) {
N /= d;
cout << d << " ";
}
if (N%d !=0) {
d += 1;
}
}
}
}
} | # 2016754, 2024-09-28 11:58:24, -PPPPPPPPPPPPPPP-- (83%)
#include <iostream>
using namespace std;
int main() {
long long N;
cin >> N;
long long d=2;
if (N < 2) {
cout << "No prime factors for numbers less than 2";
} else {
while (N > 1) {
if (d*d > N) {
cout << N << " ";
break;
} else {
while (N%d==0) {
N /= d;
cout << d << " ";
}
if (N%d !=0) {
d += 1;
}
}
}
}
} |
# 2015195, 2024-09-28 09:43:30, PPP--P-P-PTTPT--PP (50%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin>>n;
int d = 2;
if(n < 2)
{
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else
{
while(true)
{
if(n > 1)
{
// cout<<"n > 1";
if(d * d > n)
{
/*
*/
for(int i=2;i<=n;i++)
{
int check = 0;
for(int j = 1;j<=i;j++)
{
if(i % j == 0)
{
check += 1;
}
}
if(check == 2)
{
cout<<i<<' ';
}
}
// cout<<endl;
return 0;
}
else
{
// cout<<"2"<<endl;
while(true)
{
if(n % d == 0)
{
n /= d;
/*
for(int i=2;i<=d;i++)
{
int check = 0;
for(int j = 1;j<=i;j++)
{
if(i % j == 0)
{
check += 1;
}
}
if(check == 2)
{
cout<<i<<' ';
}
}
cout<<" |2.1| ";
continue;
*/
cout<<d<<' ';
continue;
}
else
{
d += 1;
// cout<<" |2.2| ";
break;
}
}
// cout<<endl;
continue;
}
}
else
{
return 0;
}
}
}
}
/*
1000
wrong
2 2 2 2 3 5 2 3 5 2 3 5
correct
2 2 2 5 5 5
1000
2
n = 500
n = 250
n = 125
d = 3
d = 4
d = 5
n = 25
2 2 2 2 3 5
*/ | # 2015203, 2024-09-28 09:44:14, PP--------TT-T--PP (22%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin>>n;
int d = 2;
if(n < 2)
{
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else
{
while(true)
{
if(n > 1)
{
// cout<<"n > 1";
if(d * d > n)
{
/*
*/
for(int i=2;i<=n;i++)
{
int check = 0;
for(int j = 1;j<=i;j++)
{
if(i % j == 0)
{
check += 1;
}
}
if(check == 2)
{
cout<<i<<' ';
}
}
// cout<<endl;
return 0;
}
else
{
// cout<<"2"<<endl;
while(true)
{
if(n % d == 0)
{
n /= d;
for(int i=2;i<=d;i++)
{
int check = 0;
for(int j = 1;j<=i;j++)
{
if(i % j == 0)
{
check += 1;
}
}
if(check == 2)
{
cout<<i<<' ';
}
}
cout<<" |2.1| ";
continue;
// cout<<d<<' ';
continue;
}
else
{
d += 1;
// cout<<" |2.2| ";
break;
}
}
// cout<<endl;
continue;
}
}
else
{
return 0;
}
}
}
}
/*
1000
wrong
2 2 2 2 3 5 2 3 5 2 3 5
correct
2 2 2 5 5 5
1000
2
n = 500
n = 250
n = 125
d = 3
d = 4
d = 5
n = 25
2 2 2 2 3 5
*/ | # 2015209, 2024-09-28 09:44:43, PPP------PTT-T--PP (33%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin>>n;
int d = 2;
if(n < 2)
{
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else
{
while(true)
{
if(n > 1)
{
// cout<<"n > 1";
if(d * d > n)
{
/*
*/
for(int i=2;i<=n;i++)
{
int check = 0;
for(int j = 1;j<=i;j++)
{
if(i % j == 0)
{
check += 1;
}
}
if(check == 2)
{
cout<<i<<' ';
}
}
// cout<<endl;
return 0;
}
else
{
// cout<<"2"<<endl;
while(true)
{
if(n % d == 0)
{
n /= d;
for(int i=2;i<=d;i++)
{
int check = 0;
for(int j = 1;j<=i;j++)
{
if(i % j == 0)
{
check += 1;
}
}
if(check == 2)
{
cout<<i<<' ';
}
}
// cout<<" |2.1| ";
continue;
// cout<<d<<' ';
continue;
}
else
{
d += 1;
// cout<<" |2.2| ";
break;
}
}
// cout<<endl;
continue;
}
}
else
{
return 0;
}
}
}
}
/*
1000
wrong
2 2 2 2 3 5 2 3 5 2 3 5
correct
2 2 2 5 5 5
1000
2
n = 500
n = 250
n = 125
d = 3
d = 4
d = 5
n = 25
2 2 2 2 3 5
*/ | # 2016047, 2024-09-28 11:07:55, PPPPPPPPPPTTPTPPPP (83%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin>>n;
int d = 2;
if(n < 2)
{
cout<<"No prime factors for numbers less than 2.";
return 0;
}
else
{
while(true)
{
if(n > 1)
{
// cout<<"n > 1";
if(d * d > n)
{
/*
*/
for(int i=2;i<=n;i++)
{
int check = 0;
for(int j = 1;j<=i;j++)
{
if(i % j == 0)
{
check += 1;
}
}
if(check == 2 && n % i == 0)
{
cout<<i<<' ';
}
}
// cout<<endl;
return 0;
}
else
{
// cout<<"2"<<endl;
while(true)
{
if(n % d == 0)
{
n /= d;
for(int i=2;i<=d;i++)
{
int check = 0;
for(int j = 1;j<=i;j++)
{
if(i % j == 0)
{
check += 1;
}
}
if(check == 2 && d % i == 0)
{
cout<<i<<' ';
}
}
// cout<<" |2.1| ";
continue;
// cout<<d<<' ';
continue;
}
else
{
d += 1;
// cout<<" |2.2| ";
break;
}
}
// cout<<endl;
continue;
}
}
else
{
return 0;
}
}
}
}
/*
1000
wrong
2 2 2 2 3 5 2 3 5 2 3 5
correct
2 2 2 5 5 5
1000
2
n = 500
n = 250
n = 125
d = 3
d = 4
d = 5
n = 25
2 2 2 2 3 5
*/ |
# 2017302, 2024-09-28 13:16:15, PPPPPPPPPPTTPTPPPP (83%)
#include <iostream>
using namespace std ;
int main(){
long long N , d = 2;
bool prime = false ;
cin >> N ;
if (N < 2) {
cout << "No prime factors for numbers less than 2." ;
}
while (N > 1) {
if (d*d > N) {
for (int i = 2; i < N-1; i++) {
if (N%i == 0) {
for (int j = 2; j < i-1; j++) {
if (i%j != 0) {
prime = true ;
}
}
if (prime == true) {
cout << i << " " ;
}
}
}
}
prime = false ;
while (N%d == 0) {
N /= d ;
if (d==2 || d==3) {
prime = true ;
}
for (int i = 2; i < d-1; i++) {
if (d%i != 0 ) {
prime = true ;
}
}
if (prime == true) {
cout << d << " " ;
}
}
d +=1 ;
}
} |
# 2017095, 2024-09-28 12:55:06, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + " ";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017128, 2024-09-28 12:58:50, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
return 0;
}
int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + " ";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017153, 2024-09-28 13:02:53, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
long long int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + " ";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017159, 2024-09-28 13:03:28, -----------T------ (0%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
long long int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + "";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017162, 2024-09-28 13:03:42, -----------T------ (0%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
long long int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + "";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017165, 2024-09-28 13:04:15, -----------T------ (0%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
long long int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + "";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017166, 2024-09-28 13:04:26, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
long long int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + " ";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017192, 2024-09-28 13:06:56, -PPPPPPPPP-------- (50%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
unsigned int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
unsigned int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + " ";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017198, 2024-09-28 13:07:16, -PPPPPPPPP-------- (50%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
unsigned int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
long long int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + " ";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017203, 2024-09-28 13:07:42, Compilation error (0%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
longlong int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
long long int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + " ";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} | # 2017205, 2024-09-28 13:07:54, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long int n;
cin>>n;
string out;
if(n<2){
cout<<"No prime factors for numbers less than 2";
return 0;
}
long long int d = 2;
while(d<=n){
if(n%d == 0){
n /= d;
out += to_string(d) + " ";
}
else{
d++;
}
}
cout<<out.substr(0,out.length()-1)<<endl;
} |
# 2014953, 2024-09-28 09:19:24, PP-P--P---------PP (33%)
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,d;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(n>1){
d=2;
if(d*d>n){
cout<<n<<" ";
}
else{
while(n%d==0){
n/=d;
cout<<d<<" ";
}
while(n%d>0){
d+=1;
}
cout<<n;
}
}
}
} | # 2015400, 2024-09-28 10:02:18, PP-P--P---------PP (33%)
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,d;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(n>1){
d=2;
if(d*d>n){
cout<<n<<" ";
}
else{
while(n%d==0){
n/=d;
cout<<d<<" ";
}
while(n%d>0){
d+=1;
}
cout<<n;
}
}
}
} | # 2015696, 2024-09-28 10:32:58, PP-----P--TT-PPPPP (44%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,d;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(n>1){
d=2;
if(d*d>n){
cout<<n<<" ";
}
else{
for(int i=0;i<n;i++){
if(n%d==0){
n/=d;
cout<<d<<" ";
}
if(n%d>0){
d++;
}
}
/* while(n%d>0){
d++;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
*/
cout<<n;
}
}
}
} | # 2015720, 2024-09-28 10:34:30, PPPPPPP-P-TT----PP (55%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,d;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(n>1){
d=2;
if(d*d>n){
cout<<n<<" ";
}
else{
for(int i=0;i<n;i++){
if(n%d==0){
n/=d;
cout<<d<<" ";
}
if(n%d>0){
d++;
}
}
/* while(n%d>0){
d++;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
*/
}
}
}
} | # 2015806, 2024-09-28 10:44:44, PP-P--P----P----PP (38%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,d,sum=0;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(n>1){
d=2;
if(d*d>n){
cout<<n<<" ";
}
else{
while(true){
if(n%d==0){
n/=d;
cout<<d<<" ";
}
if(n%d>0){
d++;
if(d>11){
cout<<n;
break;
}
}
}
/* while(n%d>0){
d++;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
*/
}
}
}
} | # 2015902, 2024-09-28 10:55:25, PPPPPPPPPP-PP---PP (77%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,d,sum=0;
cin>>n;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(n>1){
d=2;
if(d*d>n){
cout<<n<<" ";
}
else{
while(true){
if(n%d==0){
n/=d;
cout<<d<<" ";
}
if(n%d>0){
d++;
if(d>11){
if(n==1){
break;
}
cout<<n;
break;
}
}
}
/* while(n%d>0){
d++;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
*/
}
}
}
} |
# 2015031, 2024-09-28 09:30:23, -----------T------ (0%)
#include <iostream>
using namespace std;
int main(){
long long n, d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for number less than 2" << endl;
}
else{
while (true){
if (n > 1){
if (d * d > 2){
bool first_k;
for (long long k = 2; k <= n; k++){
while (n % k == 0){
n /= k;
if (first_k){
cout << k;
first_k = false;
}
else{
cout << " " << k;
}
}
if (n == 1){
break;
}
}
break;
}
else{
while (true){
if (n % d == 0){
n /= d;
bool first_d;
for (long long m = 2; m <= d; m++){
while (d % m == 0){
d /= m;
if (first_d){
cout << d;
first_d = false;
}
else{
cout << " " << d;
}
}
if (d == 1){
break;
}
}
continue;
}
else{
d += 1;
break;
}
}
}
continue;
}
else{
break;
}
}
}
} | # 2015174, 2024-09-28 09:42:04, -----------T------ (0%)
#include <iostream>
using namespace std;
int main(){
long long n, d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for number less than 2." << endl;
}
else{
while (true){
if (n > 1){
if (d * d > 2){
bool first_k;
for (long long k = 2; k <= n; k++){
while (n % k == 0){
n /= k;
if (first_k){
cout << k;
first_k = false;
}
else{
cout << " " << k;
}
}
if (n == 1){
break;
}
}
break;
}
else{
while (true){
if (n % d == 0){
n /= d;
bool first_d;
for (long long m = 2; m <= d; m++){
while (d % m == 0){
d /= m;
if (first_d){
cout << d;
first_d = false;
}
else{
cout << " " << d;
}
}
if (d == 1){
break;
}
}
continue;
}
else{
d += 1;
break;
}
}
}
continue;
}
else{
break;
}
}
}
} | # 2015181, 2024-09-28 09:42:33, P----------T----PP (16%)
#include <iostream>
using namespace std;
int main(){
long long n, d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for numbers less than 2." << endl;
}
else{
while (true){
if (n > 1){
if (d * d > 2){
bool first_k;
for (long long k = 2; k <= n; k++){
while (n % k == 0){
n /= k;
if (first_k){
cout << k;
first_k = false;
}
else{
cout << " " << k;
}
}
if (n == 1){
break;
}
}
break;
}
else{
while (true){
if (n % d == 0){
n /= d;
bool first_d;
for (long long m = 2; m <= d; m++){
while (d % m == 0){
d /= m;
if (first_d){
cout << d;
first_d = false;
}
else{
cout << " " << d;
}
}
if (d == 1){
break;
}
}
continue;
}
else{
d += 1;
break;
}
}
}
continue;
}
else{
break;
}
}
}
} | # 2015196, 2024-09-28 09:43:39, P----------T----PP (16%)
#include <iostream>
using namespace std;
int main(){
long long n, d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for numbers less than 2." << endl;
}
else{
while (true){
if (n > 1){
if (d * d > 2){
bool first_k;
for (long long k = 2; k <= n; k++){
while (n % k == 0){
n /= k;
if (first_k){
cout << k;
first_k = false;
}
else{
cout << " " << k;
}
}
if (n == 1){
break;
}
}
cout << endl;
break;
}
else{
while (true){
if (n % d == 0){
n /= d;
bool first_d;
for (long long m = 2; m <= d; m++){
while (d % m == 0){
d /= m;
if (first_d){
cout << d;
first_d = false;
}
else{
cout << " " << d;
}
}
if (d == 1){
break;
}
}
continue;
}
else{
d += 1;
break;
}
}
}
continue;
}
else{
break;
}
}
}
} | # 2015363, 2024-09-28 09:58:52, -PPPPPPPPPPTPPPP-- (77%)
#include <iostream>
using namespace std;
int main(){
long long n, d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for number less than 2" << endl;
}
else{
while (true){
if (n > 1){
if (d * d > 2){
bool first_k = true;
for (long long k = 2; k <= n; k++){
while (n % k == 0){
n /= k;
if (first_k){
cout << k;
first_k = false;
}
else{
cout << " " << k;
}
}
if (n == 1){
break;
}
}
break;
}
else{
while (true){
if (n % d == 0){
n /= d;
bool first_d = true;
for (long long m = 2; m <= d; m++){
while (d % m == 0){
d /= m;
if (first_d){
cout << d;
first_d = false;
}
else{
cout << " " << d;
}
}
if (d == 1){
break;
}
}
continue;
}
else{
d += 1;
break;
}
}
}
continue;
}
else{
break;
}
}
cout << endl;
}
} |
# 2014836, 2024-09-28 09:09:18, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n ;
cin >> n;
int d = 2 ;
if (n < 2)
{
cout << "No prime factors for number less than 2." ;
} else
{
sec_go :
if (n>1)
{
if ( d * d > n)
{
cout << n<< " ";
} else
{
fri_go :
if (n%d == 0)
{
n /= d ;
cout << d<< " " ;
goto fri_go ;
} else
{
d += 1;
goto sec_go ;
}
}
}
}
return 0 ;
} | # 2014840, 2024-09-28 09:09:39, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n ;
cin >> n;
int d = 2 ;
if (n < 2)
{
cout << "No prime factors for number less than 2." ;
} else
{
sec_go :
if (n>1)
{
if ( d * d > n)
{
cout << n<< " ";
} else
{
fri_go :
if (n%d == 0)
{
n /= d ;
cout << d<< " " ;
goto fri_go ;
} else
{
d += 1;
goto sec_go ;
}
}
}
}
return 0 ;
} | # 2015395, 2024-09-28 10:02:08, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n ;
cin >> n;
int d = 2 ;
if (n < 2)
{
cout << "No prime factors for number less than 2." ;
} else
{
sec_go :
if (n>1)
{
if ( d * d > n)
{
cout << n<< " ";
} else
{
fri_go :
if (n%d == 0)
{
n /= d ;
cout << d<< " " ;
goto fri_go ;
} else
{
d += 1;
goto sec_go ;
}
}
}
}
return 0 ;
} | # 2015404, 2024-09-28 10:02:29, -PPPPPPPPPPTPPPP-- (77%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long n ;
cin >> n;
int d = 2 ;
if (n < 2)
{
cout << "No prime factors for number less than 2." ;
} else
{
sec_go :
if (n>1)
{
if ( d * d > n)
{
cout << n<< " ";
} else
{
fri_go :
if (n%d == 0)
{
n /= d ;
cout << d<< " " ;
goto fri_go ;
} else
{
d += 1;
goto sec_go ;
}
}
}
}
return 0 ;
} |
# 2014920, 2024-09-28 09:15:31, -PP--P-P-P-TP----- (33%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers leass than 2.";
}
else{
do{
if(n>1){
if(d*d>n){
cout<<d<<" ";
break;
}
else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}
else{
d+=1;
}
}
}
else{
break;
}
}while(n>1);
}
} | # 2014982, 2024-09-28 09:23:01, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers leass than 2.";
}
else{
do{
if(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}
else{
d+=1;
}
}
}
else{
break;
}
}while(n>1);
}
} | # 2015079, 2024-09-28 09:33:39, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers leass than 2.";
}
else{
do{
if(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}
else{
d+=1;
}
}
}
else{
break;
}
}while(n>1);
}
} | # 2015187, 2024-09-28 09:42:58, -PPPPPPPPPPTPPPP-- (77%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers leass than 2.";
}
else{
do{
if(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
else{
if(n%d==0){
n/=d;
cout<<d<<" ";
}
else{
d+=1;
}
}
}
else{
break;
}
}while(n>1);
}
} |
# 2014939, 2024-09-28 09:18:04, PP-PP-P-P-TPTTTTPP (50%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll check(ll a) {
double s = sqrt(a);
int sum = 0;
for(int i = 2 ; i <s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(int i = 2 ; i < sqrt(n) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n;
return 0;
}
}
else {
break;
}
}
}
} | # 2014943, 2024-09-28 09:18:24, PP-PP-P-P-TPTTTTPP (50%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll check(ll a) {
double s = sqrt(a);
int sum = 0;
for(int i = 2 ; i <s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(int i = 2 ; i < sqrt(n) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n;
return 0;
}
}
else {
break;
}
}
}
} | # 2014974, 2024-09-28 09:22:03, PP-PP-P-PPTPTTTTPP (55%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll check(ll a) {
double s = sqrt(a);
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(int i = 2 ; i < sqrt(n) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n;
return 0;
}
}
else {
break;
}
}
}
} | # 2014983, 2024-09-28 09:23:05, PP-P--P---TPTTTTPP (38%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll check(ll a) {
double s = sqrt(a);
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(int i = 2 ; i < sqrt(n) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
if(check(n)==true) {
cout<<n;
return 0;
}
cout<<i<<" ";
}
else {
break;
}
}
}
} | # 2015002, 2024-09-28 09:25:37, PP-PP-P-PPTPTTTTPP (55%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll check(ll a) {
double s = sqrt(a);
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(int i = 2 ; i < sqrt(n) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n;
return 0;
}
}
else {
break;
}
}
}
} | # 2015011, 2024-09-28 09:27:00, PP-PP-P-PPTPTTTTPP (55%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll check(ll a) {
double s = sqrt(a);
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(int i = 2 ; i < sqrt(n) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n<<" ";
return 0;
}
}
else {
break;
}
}
}
} | # 2015036, 2024-09-28 09:30:56, PPPPPPPPPPTPTTTTPP (72%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool check(ll a) {
double s = floor(sqrt(a));
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(int i = 2 ; i <= floor(sqrt(n)) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n<<" ";
return 0;
}
}
else {
break;
}
}
}
} | # 2015076, 2024-09-28 09:33:32, PPPPPPPPPPTPTTTTPP (72%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool check(ll a) {
double s = floor(sqrt(a));
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(int i = 2 ; i <= floor(sqrt(n)) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n<<" ";
return 0;
}
}
else {
break;
}
}
}
} | # 2015104, 2024-09-28 09:35:00, PPPPPPPPPPTPTTTTPP (72%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool check(ll a) {
double s = floor(sqrt(a));
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum ==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
vector<ll> v;
for(ll i = 2 ; i <= floor(sqrt(n)); i++) {
if(check(i) == true) v.push_back(i);
}
for(int i = 0 ; i < v.size() ; i++) {
while(n%v[i] == 0) {
if(n%v[i] == 0) {
n = n/v[i];
cout<<v[i]<<" ";
if(check(n)==true) {
cout<<n<<" ";
return 0;
}
}
else {
break;
}
}
}
} | # 2015137, 2024-09-28 09:39:35, PP-PP-P-PPTPTTTTPP (55%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll check(ll a) {
double s = sqrt(a);
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(int i = 2 ; i < sqrt(n) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n;
return 0;
}
}
else {
break;
}
}
}
} | # 2015140, 2024-09-28 09:39:56, PPPPPPPPPPTPTTTTPP (72%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool check(ll a) {
double s = floor(sqrt(a));
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum ==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
vector<ll> v;
for(ll i = 2 ; i <= floor(sqrt(n)); i++) {
if(check(i) == true) v.push_back(i);
}
for(int i = 0 ; i < v.size() ; i++) {
while(n%v[i] == 0) {
if(n%v[i] == 0) {
n = n/v[i];
cout<<v[i]<<" ";
if(check(n)==true) {
cout<<n<<" ";
return 0;
}
}
else {
break;
}
}
}
} | # 2015215, 2024-09-28 09:45:27, PPPPPPPPPPTPTTTTPP (72%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool check(ll a) {
ll s = floor(sqrt(a));
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
if(sum > 0) break;
}
if(sum == 0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
vector<ll> v;
for(ll i = 2 ; i <= floor(sqrt(n)); i++) {
if(check(i) == true) v.push_back(i);
}
int g = v.size();
for(int i = 0 ; i < g ; i++) {
while(n%v[i] == 0) {
if(n%v[i] == 0) {
n = n/v[i];
cout<<v[i]<<" ";
if(check(n)==true) {
cout<<n<<" ";
return 0;
}
}
else {
break;
}
}
}
} | # 2015228, 2024-09-28 09:47:21, PPPPPPPPPPTPTTTTPP (72%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool check(ll a) {
double s = floor(sqrt(a));
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(ll i = 2 ; i <= floor(sqrt(n)) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n<<" ";
return 0;
}
}
else {
break;
}
}
}
} | # 2015238, 2024-09-28 09:47:55, PPPPPPPPPPTPTTTTPP (72%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool check(ll a) {
double s = floor(sqrt(a));
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(ll i = 2 ; i <= floor(sqrt(n)) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n;
return 0;
}
}
else {
break;
}
}
}
} | # 2015673, 2024-09-28 10:30:21, PPPPPPPPPPTPTTTTPP (72%)
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool check(ll a) {
double s = floor(sqrt(a));
int sum = 0;
for(int i = 2 ; i <=s ; i++) {
if(a%i == 0) sum++;
}
if(sum==0 )return true;
else return false;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin>>n;
if(n<2) {
cout<<"No prime factors for numbers less than 2.";
return 0;
}
if(check(n)==true) {
cout<<n;
return 0;
}
for(ll i = 2 ; i <= floor(sqrt(n)) ; i++) {
while(n%i == 0) {
if(n%i == 0 && check(i)==true) {
n = n/i;
cout<<i<<" ";
if(check(n)==true) {
cout<<n;
return 0;
}
}
else {
break;
}
}
}
} |
# 2014915, 2024-09-28 09:14:49, -PPPPPPPPP-TP----- (55%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
double d = 2;
if (number < 2){
cout << "No prime factors for number less than 2";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if (d*d> number){
cout << number;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2014918, 2024-09-28 09:15:18, -PPPPPPPPPTTP----- (55%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
long long d = 2;
if (number < 2){
cout << "No prime factors for number less than 2";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if (d*d> number){
cout << number;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2015173, 2024-09-28 09:42:02, -PPPPPPPPPTTP----- (55%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
long long d = 2;
if (number < 2){
cout << "No prime factors for number less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if (d*d> number){
cout << number;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2015397, 2024-09-28 10:02:09, -PPPPPPPPPTTP----- (55%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
long long d = 2;
if (number < 2){
cout << "No prime factors for number less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if (d*d> number){
cout << number;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2015504, 2024-09-28 10:13:09, -PPPPPPPPPTTP----- (55%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
long long d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if (d*d> number){
cout << number;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2015508, 2024-09-28 10:13:44, PPPPPPPPPPTTP---PP (72%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
long long d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if (d*d> number){
cout << number;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2015547, 2024-09-28 10:16:29, PPPPPPPPPPTTP---PP (72%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
long long d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if ( d*d > number){
cout << number;
return 0;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2015555, 2024-09-28 10:17:38, PPPPPPPPPPTTP---PP (72%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
long long d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if ( pow(d,2) > number){
cout << number;
return 0;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2016384, 2024-09-28 11:39:08, -----------T------ (0%)
#include <bits/stdc++.h>
using namespace std;
int main(){
double number;
cin >> number;
cout << number;
double d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if ( d*d > number){
cout << number;
return 0;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << number << endl;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2016389, 2024-09-28 11:39:28, ----------TT------ (0%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
cout << number;
long long d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if ( d*d > number){
cout << number;
return 0;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << number << endl;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2016401, 2024-09-28 11:40:00, ----------TT------ (0%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
cout << number;
long long d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if ( d*d > number){
cout << number;
return 0;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
//cout << number << endl;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2016412, 2024-09-28 11:40:37, ----------TT------ (0%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
cout << number;
long long d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if ( d*d > number){
cout << number;
return 0;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << number << endl;
//cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2016555, 2024-09-28 11:49:36, PP-P--P----P----PP (38%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
long long d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if ( d*d > number){
cout << number;
return 0;
}
else
{
Flag2:
if (number&d == 0){
number/=d;
//cout << number << endl;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} | # 2016564, 2024-09-28 11:50:11, PPPPPPPPPPTTP---PP (72%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long number;
cin >> number;
long long d = 2;
if (number < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
Flag:
if (number <= 1){
//do nothing
}
else{
if ( pow(d,2) > number){
cout << number;
return 0;
}
else
{
Flag2:
if (fmod(number,d) == 0){
number/=d;
cout << d << " ";
goto Flag2;
}
else{
d+=1;
}
goto Flag;
}
}
}
return 0;
} |
# 2017020, 2024-09-28 12:47:18, PPTPPTPTPTTTTTTTPP (44%)
#include <iostream>
#include <cmath>
int main()
{
int N , d;
std::cin >> N ;
d=2;
if(N<2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
else
{
while(true)
if(N>1)
{
if(d*d>N)
{
std::cout << N ;
break;
}
else
{
while(N %d==0)
{
N/=d;
std::cout << d << " " ;
}
d+=1;
continue;
}
}
}
} | # 2017066, 2024-09-28 12:51:15, PPTPPTPTPTTTTTTTPP (44%)
#include <iostream>
#include <cmath>
int main()
{
int N ;
std::cin >> N ;
int d=2;
if(N<2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
else
{
while(true)
{
if(N>1)
{
if(d*d>N)
{
std::cout << N ;
break;
}
else
{
while(N %d==0)
{
N/=d;
std::cout << d << " " ;
}
d+=1;
}
}
}
}
} | # 2017097, 2024-09-28 12:55:17, PPTPPTPTPTTTTTTTPP (44%)
#include <iostream>
#include <cmath>
int main()
{
int N ;
std::cin >> N ;
int d=2;
if(N<2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
else
{
while(true)
{
if(N>1)
{
if(d*d>N)
{
std::cout << N ;
break;
}
else
{
while(N %d==0)
{
N/=d;
std::cout << d << " " ;
}
d+=1;
}
}
}
}
} | # 2017108, 2024-09-28 12:56:42, PPTPPTPTPTPTTPPPPP (66%)
#include <iostream>
#include <cmath>
int main()
{
long long N ;
std::cin >> N ;
int d=2;
if(N<2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
else
{
while(true)
{
if(N>1)
{
if(d*d>N)
{
std::cout << N ;
break;
}
else
{
while(N %d==0)
{
N/=d;
std::cout << d << " " ;
}
d+=1;
}
}
}
}
} | # 2017112, 2024-09-28 12:57:11, PPTPPTPTPTPPTPPPPP (72%)
#include <iostream>
#include <cmath>
int main()
{
long long N ;
std::cin >> N ;
long long d=2;
if(N<2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
else
{
while(true)
{
if(N>1)
{
if(d*d>N)
{
std::cout << N ;
break;
}
else
{
while(N %d==0)
{
N/=d;
std::cout << d << " " ;
}
d+=1;
}
}
}
}
} | # 2017187, 2024-09-28 13:06:37, PPTPPTPTPT------PP (44%)
#include <iostream>
#include <cmath>
int main()
{
int N ;
std::cin >> N ;
long long d=2;
if(N<2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
else
{
while(true)
{
if(N>1)
{
if(d*d>N)
{
std::cout << N ;
break;
}
else
{
while(N %d==0)
{
N/=d;
std::cout << d << " " ;
}
d+=1;
}
}
}
}
} | # 2017191, 2024-09-28 13:06:53, PPTPPTPTPTPPTPPPPP (72%)
#include <iostream>
#include <cmath>
int main()
{
long long N ;
std::cin >> N ;
long long d=2;
if(N<2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
else
{
while(true)
{
if(N>1)
{
if(d*d>N)
{
std::cout << N ;
break;
}
else
{
while(N %d==0)
{
N/=d;
std::cout << d << " " ;
}
d+=1;
}
}
}
}
} | # 2017696, 2024-09-28 13:58:21, PPTPPTPTPTPPTPPPPP (72%)
#include <iostream>
#include <cmath>
int main()
{
long long N ;
std::cin >> N ;
long long d=2;
if(N<2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
else
{
while(true)
{
if(N>1)
{
if(d*d>N)
{
std::cout << N ;
break;
}
else
{
while(N %d==0)
{
N/=d;
std::cout << d << " " ;
}
d+=1;
}
}
}
}
return 0 ;
} |
# 2016960, 2024-09-28 12:40:17, -TPTTPTPTPTTPTTT-- (27%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for number less than 2";
}else{
do{
if(d*d>n){
for(int i = d ; i < n ; i++){
while(n%i==0){
cout << i << " ";
n = n/i;
}
}
}else{
for(int i = d ; i < n ; i++){
while(n%i==0){
cout << i << " ";
n /=i;
}
}
}
}while(n>1);
}
} | # 2016964, 2024-09-28 12:40:40, -TPTTPTPTPTTPTTT-- (27%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for number less than 2";
}else{
do{
if(d*d>n){
for(int i = d ; i < n ; i++){
while(n%i==0){
cout << i << " ";
n = n/i;
}
}
}else{
for(int i = d ; i < n ; i++){
while(n%i==0){
cout << i << " ";
n /=i;
}
}
}
}while(n>1);
}
} | # 2016976, 2024-09-28 12:42:10, --P--P-P-P-TP----- (27%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for number less than 2";
}else{
for(int i = d ; i < n ; i++){
while(n%i==0){
cout << i << " ";
n = n/i;
}
}
}
} | # 2017021, 2024-09-28 12:47:20, -PPPPPPPPP-PP----- (61%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for number less than 2";
}else{
for(int i = d ; i < 8 ; i++){
while(n%i==0){
cout << i << " ";
n = n/i;
}
}
}
if(n!=1){
cout << n;
}
} | # 2017035, 2024-09-28 12:48:31, -PPPPPPPPP-PP----- (61%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for number less than 2.";
}else{
for(int i = d ; i < 8 ; i++){
while(n%i==0){
cout << i << " ";
n = n/i;
}
}
}
if(n!=1){
cout << n;
}
} | # 2017040, 2024-09-28 12:49:07, PPPPPPPPPP-PP----- (66%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}else{
for(int i = d ; i < 8 ; i++){
while(n%i==0){
cout << i << " ";
n = n/i;
}
}
}
if(n!=1){
cout << n;
}
} | # 2017050, 2024-09-28 12:50:05, PPPPPPPPPP-PP----- (66%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}else{
for(long long i = d ; i < 8 ; i++){
while(n%i==0){
cout << i << " ";
n = n/i;
}
}
}
if(n!=1){
cout << n;
}
} | # 2017056, 2024-09-28 12:50:37, PP-PP-P-PPPPPPPP-- (72%)
#include<iostream>
using namespace std;
int main(){
long long n;
cin >> n;
long long d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}else{
for(long long i = d ; i*i < n ; i++){
while(n%i==0){
cout << i << " ";
n = n/i;
}
}
}
if(n!=1){
cout << n;
}
} |
# 2017130, 2024-09-28 12:59:04, -TPTTPTPTPTTPTTT-- (27%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long n;
cin>>n;
long long d=2;
//long long prime[100];
if(n<2){
cout<<"No prime factors for numbers less thamn 2."<<endl;
}else{
while(n>1){
if((d*d)>n){
if(n%2 ==0) cout<<"2 "<<endl;
}else{
while(n%d ==0){
if(n%d ==0) cout<<d<<" ";
n/=d;
}
d+=1;
}
}
}
} | # 2018388, 2024-09-28 14:57:15, -P-PP-P-P-PP-PPP-- (55%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long n;
cin>>n;
long long d=2;
//long long prime[100];
if(n<2){
cout<<"No prime factors for numbers less thamn 2."<<endl;
}else{
while((n>1)&&(d<=sqrt(n))){
if((d*d)>n){
if(n%2 ==0) cout<<"2 "<<endl;
}else{
while(n%d ==0){
cout<<d<<" ";
n/=d;
}
d+=1;
}
}
cout<<n;
}
} | # 2018400, 2024-09-28 14:58:20, PP-PP-P-P-PP-PPPPP (72%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long n;
cin>>n;
long long d=2;
//long long prime[100];
if(n<2){
cout<<"No prime factors for numbers less than 2."<<endl;
}else{
while((n>1)&&(d<=sqrt(n))){
if((d*d)>n){
if(n%2 ==0) cout<<"2 "<<endl;
}else{
while(n%d ==0){
cout<<d<<" ";
n/=d;
}
d+=1;
}
}
cout<<n;
}
} |
# 2016853, 2024-09-28 12:30:45, --PPPPPPPPPTPPPP-- (72%)
#include<iostream>
using namespace std;
int main(){
long long int n;
cin >> n;
int d = 2;
if(n <= 2){
cout << "No prime factors for number less than 2.";
}else{
while( n > 1){
if(d * d > n){
cout << n << " ";
break;
}else{
while(n%d == 0){
n/=d;
cout << d << " ";
}
if(n%d != 0){
d += 1;
}
}
}
}
} |
# 2014936, 2024-09-28 09:17:19, PPPTTTTTTPTTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
cout << input << " ";
break;
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
break;
}
}
}
} | # 2016185, 2024-09-28 11:21:59, PPTTTTTTTTTTTTTTPP (22%)
#include <iostream>
#include <vector>
using namespace std;
int main() {
int input;
cin >> input;
vector<int> set;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
set.push_back(input);
}
if (set.empty()) {
continue;
} else {
for (int i = 0; i < set.size(); ++i) {
cout << set[i] << " ";
}
break;
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
++divine;
break;
}
}
}
} | # 2016188, 2024-09-28 11:22:17, PPTTTTTTTTTTTTTTPP (22%)
#include <iostream>
#include <vector>
using namespace std;
int main() {
int input;
cin >> input;
vector<int> set;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
set.push_back(input);
}
if (set.empty()) {
continue;
} else {
for (int i = 0; i < set.size(); ++i) {
cout << set[i] << " ";
}
break;
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
++divine;
break;
}
}
}
} | # 2016192, 2024-09-28 11:22:31, PPPTTTTTTPTTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
cout << input << " ";
break;
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
break;
}
}
}
} | # 2016196, 2024-09-28 11:22:58, PPPTPPTTTPTTTTTTPP (44%)
#include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
cout << input << " ";
break;
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
++divine;
break;
}
}
}
} | # 2016220, 2024-09-28 11:24:51, PPPTPPTTTPTTTTTTPP (44%)
#include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
cout << input << " ";
break;
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
divine += 1;
break;
}
}
}
} | # 2016236, 2024-09-28 11:26:42, P-PTTPTTTPTTTTTTPP (33%)
#include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
cout << input << " ";
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
divine += 1;
break;
}
}
}
} | # 2016240, 2024-09-28 11:27:03, PPPTPPTTTPTTTTTTPP (44%)
#include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
cout << input << " ";
break;
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
divine += 1;
break;
}
}
}
} | # 2016382, 2024-09-28 11:38:53, PTTTTTTTTTTTTTTTPP (16%)
#include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
int cal1 = divine * divine;
if (cal1 > input) {
cout << input << " ";
} else {
if (input % divine == 0) {
input /= divine;
cout << divine << " ";
} else {
divine += 1;
}
}
}
} | # 2016383, 2024-09-28 11:39:07, PPPTPPTTTPTTTTTTPP (44%)
#include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
cout << input << " ";
break;
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
divine += 1;
break;
}
}
}
} | # 2016386, 2024-09-28 11:39:12, PPPTPPTTTPTTTTTTPP (44%)
#include <iostream>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
if (divine * divine > input) {
cout << input << " ";
break;
}
while (input % divine == 0) {
input /= divine;
cout << divine << " ";
if (input % divine != 0) {
divine += 1;
break;
}
}
}
} | # 2016509, 2024-09-28 11:46:23, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <vector>
using namespace std;
int main() {
int input;
cin >> input;
int divine = 2;
vector<int> set;
if (input < 2) {
cout << "No prime factors for numbers less than 2." << endl;
}
while (input > 1) {
int cal1 = divine * divine;
if (divine * divine > input) {
set.push_back(input);
if (set.empty()) {
continue;
} else {
for (int i = 0; i < set.size(); ++i) {
cout << set[i] << " ";
}
break;
}
} else {
if (input % divine == 0) {
input /= divine;
cout << divine << " ";
} else {
divine += 1;
}
}
}
} |
# 2016870, 2024-09-28 12:32:39, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else{
while(N % d == 0){
N /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} | # 2016871, 2024-09-28 12:32:53, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else{
while(N % d == 0){
N /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} | # 2016874, 2024-09-28 12:33:06, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else{
while(N % d == 0){
N /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} | # 2017480, 2024-09-28 13:32:34, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else{
while(N % d == 0){
N /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} | # 2018038, 2024-09-28 14:26:41, P--------P------PP (22%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
/*while(N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else{
while(N % d == 0){
N /= d;
cout << d << " ";
}
d += 1;
}
}*/
for(int i=2; i < ceil(sqrt(N)); i++){
while(N % i == 0){
N /= i;
cout << i << " ";
}
}
}
return 0;
} | # 2018063, 2024-09-28 14:29:21, PP-PP-P-P-------PP (44%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
/*while(N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else{
while(N % d == 0){
N /= d;
cout << d << " ";
}
d += 1;
}
}*/
for(int i=2; i < ceil(sqrt(N));){
while(N % i == 0){
N /= i;
cout << i << " ";
}
i++;
}
cout << N;
}
return 0;
} | # 2018068, 2024-09-28 14:30:05, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else{
while(N % d == 0){
N /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} | # 2018774, 2024-09-28 15:18:21, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else{
while(N % d == 0){
N /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} | # 2018776, 2024-09-28 15:18:28, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while(N > 1){
if(d*d > N){
cout << N << " ";
break;
}
else{
while(N % d == 0){
N /= d;
cout << d << " ";
}
d += 1;
}
}
}
return 0;
} |
# 2016274, 2024-09-28 11:30:27, P-P--P-P-PTTTTTTPP (38%)
#include<bits//stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(N>1){
while(d*d<=N){
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
if(N<=1){
break;
}
}
d+=1;
}
}
return 0;
} | # 2016346, 2024-09-28 11:35:41, P-P--P-P-PTTTTTTPP (38%)
#include<bits//stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(N>1){
while(d*d<=N){
if(d*d>N){
cout<<N;
return 0;
}
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
if(N<=1){
break;
}
}
d+=1;
}
}
return 0;
} | # 2016456, 2024-09-28 11:42:59, P-P--P-P-PTTTTTTPP (38%)
#include<bits//stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(N>1){
if(d*d<=N){
while(d*d<=N){
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
if(N<=1){
break;
}
}
d+=1;
}
}
else{
cout<<d;
}
}
return 0;
} | # 2016462, 2024-09-28 11:43:22, P-P--P-P-PTTTTTTPP (38%)
#include<bits//stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(N>1){
if(d*d<=N){
while(d*d<=N){
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
if(N<=1){
break;
}
}
d+=1;
}
}
else{
cout<<d;
}
}
return 0;
} | # 2016474, 2024-09-28 11:44:00, P-P--P-P-PTTTTTTPP (38%)
#include<bits//stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
int d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(N>1){
if(d*d<=N){
while(d*d<=N){
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
if(N<=1){
break;
}
}
d+=1;
}
}
else{
cout<<d;
}
}
return 0;
} | # 2016761, 2024-09-28 11:58:36, P--PP-P-P-PP-PPPPP (66%)
#include<bits//stdc++.h>
using namespace std;
int main(){
long long int N;
cin>>N;
long long int d=2;
if(N<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
if(N>1){
if(d*d<=N){
while(d*d<=N){
while(N%d==0){
N/=d;
cout<<d<<" ";
}
d+=1;
if(N<=1){
break;
}
}
if(d*d>N){
cout<<N;
}
d+=1;
}
}
}
return 0;
} |
# 2017315, 2024-09-28 13:18:01, PTTTTTTTTTTTTTTTPP (16%)
#include <iostream>
using namespace std;
int main () {
int N;
cin >> N;
int d=2;
if (N < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while ( N > 1){
if (d*d > N){
cout << "1" << " " << d<< " " ;
}else {
if (N % d == 0){
N /= d;
cout << d << " ";
}else {
d+= 1 ;
}
}
}
}
} | # 2018024, 2024-09-28 14:25:36, PTTTTTTTT-TTTTTTPP (16%)
#include <iostream>
using namespace std;
int main () {
int n;
cin >> n;
int d=2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while ( n > 1){
while (d*d < n){
while (n%d ==0){
n /= d;
if ( d == 2 || d == 3 || d == 5|| d == 7|| d == 11 ){
cout << d <<" " ;
}
}
d += 1;
}
if ( d == 2 || d == 3 || d == 5|| d == 7|| d == 11 ){
cout << d <<" " ;
}
}
}
} | # 2018318, 2024-09-28 14:52:55, PPTPPTPTP-TTTTTTPP (44%)
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main () {
int n;
cin >> n;
int d=2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while ( n > 1){
while (d*d < n){
while (n%d ==0){
n /= d;
int count = 0;
for (int i = 1; i <= d; i++){
if (d % i == 0){
count++;
}
}
if (count <= 2){
cout << d <<" " ;
}
}
d += 1;
}
int count = 0;
for (int i = 1; i <= n; i++){
if (n % i == 0){
count++;
}
}
if (count <= 2){
cout << n <<" " ;
break;
}
}
}
} | # 2018370, 2024-09-28 14:56:25, PPTPPTPTP-PT-PPPPP (66%)
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main () {
long long n;
cin >> n;
long long d=2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while ( n > 1){
while (d*d < n){
while (n%d ==0){
n /= d;
int count = 0;
for (int i = 1; i <= d; i++){
if (d % i == 0){
count++;
}
}
if (count <= 2){
cout << d <<" " ;
}
}
d += 1;
}
int count = 0;
for (int i = 1; i <= n; i++){
if (n % i == 0){
count++;
}
}
if (count <= 2){
cout << n <<" " ;
break;
}
}
}
} | # 2018414, 2024-09-28 14:59:29, PPTPPTPTP--T----PP (44%)
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main () {
long long n;
cin >> n;
long long d=2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while ( n > 1){
while (d*d < n){
while (n%d ==0){
n /= d;
int count = 0;
for (int i = 1; i <= d; i++){
if (d % i == 0){
count++;
}
if (count > 2)break;
}
if (count <= 2){
cout << d <<" " ;
break;
}
}
d += 1;
}
int count = 0;
for (int i = 1; i <= n; i++){
if (n % i == 0){
count++;
}
if (count > 2)break;
}
if (count <= 2){
cout << n <<" " ;
break;
}
}
}
} | # 2018556, 2024-09-28 15:09:37, PPTPPTPTP-PT-PPPPP (66%)
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main () {
long long n;
cin >> n;
long long d=2;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while ( n > 1){
while (d*d < n){
while (n%d ==0){
n /= d;
int count = 0;
for (int i = 1; i <= d; i++){
if (d % i == 0){
count++;
}
}
if (count <= 2){
cout << d <<" " ;
}
}
d += 1;
}
int count = 0;
for (int i = 1; i <= n; i++){
if (n % i == 0){
count++;
}
}
if (count <= 2){
cout << n <<" " ;
break;
}
}
}
} |
# 2016915, 2024-09-28 12:36:07, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else while(N > 1){
if(d*d > N){
cout << N;
break;
} else while(N%d == 0){
N /= d;
cout << d << ' ';
}
d += 1;
}
} | # 2016922, 2024-09-28 12:36:39, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else while(N > 1){
if(d*d > N){
cout << N;
break;
} else while(N%d == 0){
N /= d;
cout << d << ' ';
}
d += 1;
}
} | # 2016935, 2024-09-28 12:37:49, PPPPPPPPPPTTTTTT-- (55%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2 && N > 0){
cout << "No prime factors for numbers less than 2.";
} else while(N > 1){
if(d*d > N){
cout << N;
break;
} else while(N%d == 0){
N /= d;
cout << d << ' ';
}
d += 1;
}
} | # 2017449, 2024-09-28 13:30:32, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
} else while(N > 1){
if(d*d > N){
cout << N;
break;
} else while(N%d == 0){
N /= d;
cout << d << ' ';
}
d += 1;
}
} | # 2018729, 2024-09-28 15:17:00, PPPPPPPPPPTTTTTTPP (66%)
#include <iostream>
using namespace std;
int main()
{
int N;
cin >> N;
int d = 2;
if (N < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
while (N > 1)
{
if (d * d > N)
{
cout << N;
break;
}
else
while (N % d == 0)
{
N /= d;
cout << d << ' ';
}
d += 1;
}
} |
# 2015099, 2024-09-28 09:34:34, -PPTPPTTTTTTTTTT-- (22%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2" << endl;
}else{
while(N>1){
if((d*d)>N){
cout << N << ' ';
break;
}else{
for(;N%d == 0; d+=1){
N /= d;
cout << d << ' ';
}
}
}
}
} | # 2015212, 2024-09-28 09:44:56, PPPTPPTTTTTTTTTTPP (38%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2." << endl;
}else{
while(N>1){
if((d*d)>N){
cout << N << ' ';
break;
}else{
for(;N%d == 0; d+=1){
N /= d;
cout << d << ' ';
}
}
}
}
} | # 2015217, 2024-09-28 09:45:38, PPPTPPTTTTTTTTTTPP (38%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2." << endl;
}else{
while(N>1){
if((d*d)>N){
cout << N << ' ';
break;
}else{
for(;N%d == 0; d+=1){
N /= d;
cout << d << ' ';
}
}
}
}
} | # 2015260, 2024-09-28 09:49:53, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2." << endl;
}else{
while(N>1){
if((d*d)>N){
cout << N << ' ';
break;
}else{
while(true){
if(N%d == 0){
N /= d;
cout << d << ' ';
break;
}else{
d++;
}
}
}
}
}
} | # 2015403, 2024-09-28 10:02:24, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2." << endl;
}else{
while(N>1){
if((d*d)>N){
cout << N << ' ';
break;
}else{
while(true){
if(N%d == 0){
N /= d;
cout << d << ' ';
break;
}else{
d++;
}
}
}
}
}
} |
# 2017488, 2024-09-28 13:33:29, P--PPPPPP--P----PP (55%)
#include <iostream>
#include <cmath>
using namespace std;
bool isPrime(int num){
for (long long int i=2;i<num;i++){
if (num%i==0){
return false;
}
}
return true;
}
int main(){
long long int N;
long long int d=2;
cin >> N;
if (N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while (N > 2){
if (isPrime(N)){
cout << N;
break;
}
for (long long int i=2;i<N;i++){
if (isPrime(i) && N%i==0){
cout << i << " ";
N/=i;
break;
}
}
}
}
} | # 2017993, 2024-09-28 14:23:36, PTPTTPTPTPxxPxxxPP (44%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long long int N;
long long int d = 2;
cin >> N;
if (N<2){
cout << "No prime factors for numbers less than 2.";
}
else{
while (N>1){
if (d*d>N){
cout << N << " ";
}
else{
while (N%d==0)
{
N/=d;
cout << d << " ";
}
d+=1;
}
}
}
} | # 2018047, 2024-09-28 14:27:59, P--PPPPPP-TTPPPP-T (61%)
#include <iostream>
#include <cmath>
using namespace std;
bool isPrime(u_int64_t num){
for (u_int64_t i=2;i<floor(num/2);i++){
if (num%i==0){
return false;
}
}
return true;
}
int main(){
u_int64_t N;
cin >> N;
if (N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while (N > 2){
if (isPrime(N)){
cout << N;
break;
}
for (u_int64_t i=2;i<N;i++){
if (isPrime(i) && N%i==0){
cout << i << " ";
N/=i;
break;
}
}
}
}
} | # 2018051, 2024-09-28 14:28:26, P--PPPPPP-TTPPPP-T (61%)
#include <iostream>
#include <cmath>
using namespace std;
bool isPrime(u_int64_t num){
for (u_int64_t i=2;i<num;i++){
if (num%i==0){
return false;
}
}
return true;
}
int main(){
u_int64_t N;
cin >> N;
if (N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while (N > 2){
if (isPrime(N)){
cout << N;
break;
}
for (u_int64_t i=2;i<N;i++){
if (isPrime(i) && N%i==0){
cout << i << " ";
N/=i;
break;
}
}
}
}
} | # 2018070, 2024-09-28 14:30:30, P--PPPPPP-TPPPPP-- (66%)
#include <iostream>
#include <cmath>
using namespace std;
bool isPrime(u_int64_t num){
if (num > 50){
for (u_int64_t i=2;i<ceil(sqrt(num));i++){
if (num%i==0){
return false;
}
}
}
else{
for (u_int64_t i=2;i<num;i++){
if (num%i==0){
return false;
}
}
}
return true;
}
int main(){
u_int64_t N;
cin >> N;
if (N < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
while (N > 2){
if (isPrime(N)){
cout << N;
break;
}
for (u_int64_t i=2;i<N;i++){
if (isPrime(i) && N%i==0){
cout << i << " ";
N/=i;
break;
}
}
}
}
} |
# 2014877, 2024-09-28 09:12:10, --P--P-P-PTTTTTT-- (22%)
#include<iostream>
using namespace std;
int main(){
int n,d;
cin>>n;
d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(n>1){
if(d*d>n){
cout<<d<<" "<<d;
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
} | # 2014910, 2024-09-28 09:14:14, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main(){
int n,d;
cin>>n;
d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
} | # 2015061, 2024-09-28 09:33:11, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main(){
int n,d;
cin>>n;
d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
} | # 2015163, 2024-09-28 09:41:30, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main(){
int n,d;
cin>>n;
d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
cout<<n<<" ";
break;
}
while(n%d==0){
n/=d;
cout<<d<<" ";
}
d+=1;
}
}
} |
# 2017152, 2024-09-28 13:02:52, P---------TTTTTTPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n ;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
while(n>1){
if(d*d>n){
cout << n;
}
if(n%d==0){
n/=d;
cout << d << " ";
}else{
d++;
}
}
} | # 2017175, 2024-09-28 13:05:10, P---------TTTTTTPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n ;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
while(n>1){
if(d*d>n){
cout << n<< " ";
}
if(n%d==0){
n=n/d;
cout << d << " ";
}else{
d++;
}
}
} | # 2017195, 2024-09-28 13:07:03, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n ;
int d = 2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
while(n>1){
if(d*d>n){
cout << n<< " ";
break;
}
if(n%d==0){
n=n/d;
cout << d << " ";
}else{
d++;
}
}
} |
# 2017149, 2024-09-28 13:02:02, -PPPPPPPPPTTTTTT-- (50%)
#include<iostream>
using namespace std;
int main() {
int N;
cin >> N;
int d=2;
if(N<2) {
cout << "No prime factors for numbers less than 2" << endl;
} else {
while(N>=d) {
if(N%d==0){
cout << d;
N=N/d;
if(N>1) {
cout << " ";
}
}else {
d++;
}
}
}
} | # 2017335, 2024-09-28 13:19:12, PPPPPPPPPPTTTTTTPP (66%)
#include<iostream>
using namespace std;
int main() {
int N;
cin >> N;
int d=2;
if(N<2) {
cout << "No prime factors for numbers less than 2." << endl;
} else {
while(N>=d) {
if(N%d==0){
cout << d;
N=N/d;
if(N>1) {
cout << " ";
}
}else {
d++;
}
}
}
} |
# 2015045, 2024-09-28 09:31:42, ------------------ (0%)
#include <iostream>
using namespace std;
int main(){
int N=N<=19;
cin >> N;
int d=2;
while(N<2){
if(N<2){
cout << "No prime factors for numbers less than2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}break;
}
} | # 2015066, 2024-09-28 09:33:15, ------------------ (0%)
#include <iostream>
using namespace std;
int main(){
int N=N<=19;
cin >> N;
int d=2;
while(N<2){
if(N<2){
cout << "No prime factors for numbers less than2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}break;
}
} | # 2015287, 2024-09-28 09:52:17, PP--------------PP (22%)
#include <iostream>
using namespace std;
int main(){
int N;
N = N <= 19;
cin >> N;
int d=2;
while (true){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}break;
}
} | # 2015478, 2024-09-28 10:10:37, P-P-----P-TTTTTT-- (16%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i;i<N;++i<=19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2015522, 2024-09-28 10:14:38, PPPPP-P-P-TTTTTT-- (38%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i=0;i<N;++i<=19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2015531, 2024-09-28 10:15:17, PP-P--P---TTTTTT-- (22%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i=0;i<N;++i<=19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
break;
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
break;
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2015538, 2024-09-28 10:15:39, PP-P--P---TTTTTT-- (22%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i=0;i<N;++i<=19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
break;
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2015593, 2024-09-28 10:21:50, PPPPP-P-P-TTTTTT-- (38%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i=0;i<N;i++ <= 19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2015626, 2024-09-28 10:26:00, -P-PP-P---TTTTTT-- (22%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i=1;i<N;i++ <= 19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2015631, 2024-09-28 10:26:17, PPPPP-P-P-TTTTTT-- (38%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i;i<N;i++ <= 19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2015642, 2024-09-28 10:27:25, PP---------------- (11%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i;i<N;i++ <= 19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}break;
}break;
}
} | # 2015647, 2024-09-28 10:27:52, PP---------------- (11%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i;i<N;i++ <= 19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}break;
}
}break;
}
} | # 2015651, 2024-09-28 10:28:19, PP---------------- (11%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i;i<N;i++ <= 19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}break;
}
}
}break;
}
} | # 2015658, 2024-09-28 10:28:51, PP-P--P---TTTTTT-- (22%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i;i<N;i++ <= 19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
break;
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2015660, 2024-09-28 10:29:12, P---------TTTTTT-- (5%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i;i<N;i++ <= 19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
break;
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2015663, 2024-09-28 10:29:33, PPPPP-P-P-TTTTTT-- (38%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i;i<N;i++ <= 19){
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}
}break;
}
} | # 2016399, 2024-09-28 11:39:58, PPPPPPPPPPTTTTTTP- (61%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d=2;
while (true){
for(int i=-10;i<=N;i++){
if(N<2){
cout << "No prime factors for numbers less than 2.";
break;
}else{
if(N>1){
if(d*d>N){
cout << N <<" ";
break;
}else{
if (N % d == 0){
N/= d;
cout << d <<" ";
}else{
d+=1;
}
}
}
}
}break;
}
} |
# 2015018, 2024-09-28 09:28:13, P--P--P---TTTTTTPP (27%)
#include<iostream>
using namespace std;
int main(){
int n, d, box;
cin >> n;
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(n>1){
if(d*d>n){
break;
}
else{
while(n%d!=0){
d+=1;
}
}
n/=d;
cout << d << " ";
}
} | # 2015026, 2024-09-28 09:29:38, -PP--P-P-PTTTTTT-- (27%)
#include<iostream>
using namespace std;
int main(){
int n, d;
cin >> n;
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(n>1){
if(d*d>n){
break;
}
else{
while(n%d!=0){
d+=1;
}
}
n/=d;
cout << d << " ";
}
cout << d;
} | # 2015091, 2024-09-28 09:34:11, PPPP-PPP-PTTTTTTPP (55%)
#include<iostream>
using namespace std;
int main(){
int n, d;
cin >> n;
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(n>1){
if(d*d>n){
}
else{
while(n%d!=0){
d+=1;
}
}
cout << d << " ";
n/=d;
}
} | # 2015121, 2024-09-28 09:36:58, PPPP-PPP-P-TP---PP (61%)
#include<iostream>
using namespace std;
int main(){
long long n, d;
cin >> n;
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(n>1){
if(d*d>n){
}
else{
while(n%d!=0){
d+=1;
}
}
cout << d << " ";
n/=d;
}
} | # 2015123, 2024-09-28 09:37:12, PPPP-PPP-P-TP---PP (61%)
#include<iostream>
using namespace std;
int main(){
long long n, d;
cin >> n;
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(n>1){
if(d*d>n){
}
else{
while(n%d!=0){
d+=1;
}
}
cout << d << " ";
n/=d;
}
} | # 2015126, 2024-09-28 09:37:19, PPPP-PPP-P-TP---PP (61%)
#include<iostream>
using namespace std;
int main(){
long long n, d;
cin >> n;
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(n>1){
if(d*d>n){
}
else{
while(n%d!=0){
d+=1;
}
}
cout << d << " ";
n/=d;
}
} | # 2015857, 2024-09-28 10:51:04, PPPP-PPP-P-TP----T (50%)
#include<iostream>
using namespace std;
int main(){
string N;
int d;
cin >> N;
unsigned long long n =stoull(N);
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(n>1){
if(d*d>n){
}
else{
while(n%d!=0){
d+=1;
}
}
cout << d << " ";
n/=d;
}
} | # 2016265, 2024-09-28 11:29:58, PPPP-PPP-P-TPP--Px (61%)
#include<iostream>
using namespace std;
int main(){
string N;
int d;
cin >> N;
long long n =stoll(N);
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(n>1){
if(d*d>n){
}
else{
while(n%d!=0){
d+=1;
}
}
cout << d << " ";
n/=d;
}
} | # 2016515, 2024-09-28 11:47:05, PPPP-PPP-P-TPP--Px (61%)
#include<iostream>
using namespace std;
int main(){
string N;
int d;
cin >> N;
long long n =stoll(N);
d=2;
if(n<2){
cout << "No prime factors for numbers less than 2." << endl;
}
while(n>1){
if(d*d>n){
}
else{
while(n%d!=0){
d+=1;
}
}
cout << d << " ";
n/=d;
}
} |
# 2015451, 2024-09-28 10:07:39, PP-P--P----T----PP (33%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long n;
cin>>n;
int d = 2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
int i=2;
while(i<=n){
if(n%i==0){
cout<<i;
n/=i;
continue;
}
i++;
}
}
else{
d++;
}
if(n%d==0){
n/=d;
int i=2;
while(i<=d){
if(d%i==0){
cout<<i;
d/=i;
continue;
}
i++;
}
}
}
}
} | # 2015468, 2024-09-28 10:09:25, PPPP--PP-P-TPP--PP (61%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long n;
cin>>n;
int d = 2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
int i=2;
while(i<=n){
if(n%i==0){
cout<<i<<" ";
n/=i;
continue;
}
i++;
}
}
else{
d++;
}
if(n%d==0){
n/=d;
int i=2;
while(i<=d){
if(d%i==0){
cout<<i<<" ";
d/=i;
continue;
}
i++;
}
}
}
}
} | # 2015498, 2024-09-28 10:12:32, PPTPTTPTTTTTTTTTPP (33%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long n;
cin>>n;
int d = 2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
int i=2;
while(i<=n){
if(n%i==0){
cout<<i<<" ";
n/=i;
continue;
}
i++;
}
break;
}
else{
while(n%d==0){
n/=d;
int i=2;
while(i<=d){
if(d%i==0){
cout<<i<<" ";
d/=i;
continue;
}
i++;
}
}
}
d++;
}
}
} | # 2015787, 2024-09-28 10:43:13, PPTPTTPTTTTTTTTTPP (33%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long n;
cin>>n;
int d = 2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else{
while(n>1){
if(d*d>n){
int i=2;
while(i<=n){
if(n%i==0){
cout<<i<<" ";
n/=i;
continue;
}
i++;
}
}
else if(n%d==0){
while(n%d==0){
n/=d;
int i=2;
while(i<=d){
if(d%i==0){
cout<<i<<" ";
d/=i;
continue;
}
i++;
}
}
}
d++;
}
}
} |
# 2017105, 2024-09-28 12:56:35, -PPPPPPPPP-TP----- (55%)
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
long long lmod(long long a , long long b){
while(true){
if(a < b){
return a;
break;
}else{
a = (a/b);
}
}
}
int main()
{
double n = 0;
cin >> n;
double d = 2;
if (n < 2)
{
cout << "No prime factors for number less than 2.";
}
else
{
while (true)
{
if (n > 1)
{
if ( (d * d) > n)
{
cout << setprecision(15) << n << endl;
break;
}
else
{
while (true)
{
if (fmod(n,d) == 0)
{
n = (n/d);
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
break;
}
}
}
} | # 2017110, 2024-09-28 12:56:46, -PPPPPPPPP-TP----- (55%)
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
long long lmod(long long a , long long b){
while(true){
if(a < b){
return a;
break;
}else{
a = (a/b);
}
}
}
int main()
{
double n = 0;
cin >> n;
double d = 2;
if (n < 2)
{
cout << "No prime factors for number less than 2.";
}
else
{
while (true)
{
if (n > 1)
{
if ( (d * d) > n)
{
cout << setprecision(15) << n << endl;
break;
}
else
{
while (true)
{
if (fmod(n,d) == 0)
{
n = (n/d);
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
break;
}
}
}
} | # 2018639, 2024-09-28 15:13:36, -PPPPPPPPPTTP----- (55%)
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
long long lmod(long long a , long long b){
while(true){
if(a < b){
return a;
break;
}else{
a = (a/b);
}
}
}
int main()
{
long long n = 0;
cin >> n;
long long d = 2;
if (n < 2)
{
cout << "No prime factors for number less than 2.";
}
else
{
while (true)
{
if (n > 1)
{
if ( (d * d) > n)
{
cout << setprecision(15) << n << endl;
break;
}
else
{
while (true)
{
if (fmod(n,d) == 0)
{
n = (n/d);
cout << d << " ";
}
else
{
d += 1;
break;
}
}
}
}
else
{
break;
}
}
}
} |
# 2015484, 2024-09-28 10:11:14, P---------xT----PP (16%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N;int d=2;
cin >> N;
while(N != d){
if( N < 2 ){
cout << "No prime factors for numbers less than 2.";
break;
}else{
if( N > 1 ){
if( d*d > N ){
cout << d << " ";
d += 1;
}else{
if( N%d == 0 ){
N /= d;
cout << N;
}else{
d += 1;
}
}
}
}
}
} | # 2016034, 2024-09-28 11:06:15, -PP--P-P-PxTP----- (33%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N;int d=2;
cin >> N;
while(N != d){
if( N < 2 ){
cout << "No prime factors for numbers less than 2.";
break;
}else if( N > 1 ){
if( d*d > N ){
cout << d << " ";
d += 1;
}else{
if( N%d == 0 ){
cout << d << " ";
N /= d;
}else{
d += 1;
}
}
}{
}
}
cout << d;
} | # 2016698, 2024-09-28 11:56:35, -PPPPPPPPPTTTTTT-- (50%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N, d=2;
cin >> N;
while(N != d){
if(N<2){
cout << "No prime factors for numbers less than 2.";
break;
}else{
if(N%d==0){
cout << d << " ";
N /= d;
}else{
d += 1;
}
}
}
cout << d;
} | # 2016706, 2024-09-28 11:56:52, -PPPPPPPPPTTTTTT-- (50%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N, d=2;
cin >> N;
while(N != d){
if(N<2){
cout << "No prime factors for numbers less than 2.";
break;
}else{
if(N%d==0){
cout << d << " ";
N /= d;
}else{
d += 1;
}
}
}
cout << d;
} | # 2016755, 2024-09-28 11:58:26, -PPPPPPPPPTTTTTT-- (50%)
#include <iostream>
using namespace std;
int main(){
int N, d=2;
cin >> N;
while(N != d){
if(N<2){
cout << "No prime factors for numbers less than 2.";
break;
}else{
if(N%d==0){
cout << d << " ";
N /= d;
}else{
d += 1;
}
}
}
cout << d;
} |
# 2015726, 2024-09-28 10:35:17, P-P--P-P-PTTTTTTPP (38%)
#include<bits/stdc++.h>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2.";
}else {
while(N>1) {
if(d*d>N) {
for(int i=2 ; i<=sqrt(N) ;++i ) {
if(N%i==0) {
cout << i << " ";
}
}break;
}else {
while(N%d==0) {
N/=d;
cout << d << " ";
}
if(N%d!=0) {
d+=1;
}
}
}
}
} | # 2016246, 2024-09-28 11:27:39, PPP--P-P-PTTTTTTPP (44%)
#include<bits/stdc++.h>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2.";
}else {
while(N>1) {
if(d*d>N) {
cout << d << " ";
break;
}else {
while(N%d==0) {
N/=d;
cout << d << " ";
}
if(N%d!=0) {
d+=1;
}
}
}
}
} | # 2016260, 2024-09-28 11:29:36, PPP--P-P-PTTTTTTPP (44%)
#include<bits/stdc++.h>
using namespace std;
int main() {
int N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2.";
}else {
while(N>1) {
if(d*d>N) {
cout << d << " ";
break;
}else {
while(N%d==0) {
N/=d;
cout << d << " ";
}
d++;
}
}
}
} | # 2016518, 2024-09-28 11:47:15, PPP--P-P-P--P---PP (50%)
#include<bits/stdc++.h>
using namespace std;
int main() {
long long N,d=2;
cin >> N;
if(N<2) {
cout << "No prime factors for numbers less than 2.";
}else {
while(N>1) {
if(d*d>N) {
cout << d << " ";
break;
}else {
while(N%d==0) {
N/=d;
cout << d << " ";
}
d++;
}
}
}
} |
# 2015116, 2024-09-28 09:36:16, -PPPPPPPPPTTTTTT-- (50%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,d=2;
cin >> n;
if(n<2){
cout << "NO prime factors for numbers leses than 2";
}else {
while (true)
{
if(n>1){
if(d*d > n){
cout << n<< " " ;
break;
}else{
while (true){
if(n%d == 0){
n /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
}
}else{
return 0;
}
}
}
} | # 2015175, 2024-09-28 09:42:12, -PPPPPPPPPTTTTTT-- (50%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,d=2;
cin >> n;
if(n<2){
cout << "NO prime factors for numbers leses than 2.";
}else {
while (true)
{
if(n>1){
if(d*d > n){
cout << n<< " " ;
break;
}else{
while (true){
if(n%d == 0){
n /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
}
}else{
return 0;
}
}
}
} | # 2015534, 2024-09-28 10:15:20, -PPPPPPPPPTTTTTT-- (50%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,d=2;
cin >> n;
if(n<2){
cout << "NO prime factors for numbers leses than 2.";
}else {
while (true)
{
if(n>1){
if(d*d > n){
cout << n<< " " ;
break;
}else{
while (true){
if(n%d == 0){
n /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
}
}else{
return 0;
}
}
}
} | # 2015758, 2024-09-28 10:39:10, -PPPPPPPPPTTTTTT-- (50%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,d=2;
for (int i = 0; i < 19; i++)
{
cin >> n;
break;
}
if(n<2){
cout << "NO prime factors for numbers leses than 2.";
}else {
while (true)
{
if(n>1){
if(d*d > n){
cout << n<< " " ;
break;
}else{
while (true){
if(n%d == 0){
n /= d;
cout << d << " ";
}else{
d+= 1;
break;
}
}
}
}else{
return 0;
}
}
}
} |
# 2018442, 2024-09-28 15:01:46, PPPTTPT-TPTT-TTTPP (38%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
cin >> n;
long long int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(true)
{
if (n > 1)
{
while (true)
{
if (d * d > n)
{
while (true)
{
if(n==1)
return 0;
for (int i = 2; i <= n; i++)
{
bool check = true;
for (int j = 2; j < i; j++)
{
if(i == j )
continue;
// 5
if (i % j == 0)
{
check = false;
break;
}
}
if(check == false)
{
break;
}
if(i==n)
{
cout << n << " ";
return 0;
}
if(n%i == 0)
{
cout << i << " ";
n = n/i;
}
}
}
}
else
{
while(true)
{
if(n%d==0)
{
n /= d;
for (int i = 2; i <= d; i++)
{
bool check = true;
for (int j = 2; j < i; j++)
{
if(i == j )
continue;
// 5
if (i % j == 0)
{
check = false;
break;
}
}
if(check == false)
{
break;
}
if(i==d)
{
cout << d << " ";
break;
}
if(n%i == 0)
{
cout << i << " ";
d = d/i;
}
}
}
else
{
d+=1;
break;
}
}
}
}
}
else
{
break;
}
}
}
} | # 2018519, 2024-09-28 15:06:54, PPPTTPT-TPTT-TTTPP (38%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
cin >> n;
long long int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(true)
{
if (n > 1)
{
while (true)
{
if (d * d > n)
{
while (true)
{
if(n==1)
return 0;
for (int i = 2; i <= n; i++)
{
bool check = true;
for (int j = 2; j < i; j++)
{
if(i == j )
continue;
// 5
if (i % j == 0)
{
check = false;
break;
}
}
if(check == false)
{
break;
}
if(i==n)
{
cout << n << " ";
return 0;
}
if(n%i == 0)
{
cout << i << " ";
n = n/i;
}
}
}
}
else
{
while(true)
{
if(n%d==0)
{
n /= d;
int z = d;
for (int i = 2; i <= z; i++)
{
bool check = true;
for (int j = 2; j < i; j++)
{
if(i == j )
continue;
// 5
if (i % j == 0)
{
check = false;
break;
}
}
if(check == false)
{
break;
}
if(i==z)
{
cout << z << " ";
break;
}
if(n%i == 0)
{
cout << i << " ";
z = z/i;
}
}
}
else
{
d+=1;
break;
}
}
}
}
}
else
{
break;
}
}
}
} | # 2018645, 2024-09-28 15:13:51, PPPTTPTPTPTTPTTTPP (50%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
cin >> n;
long long int d = 2;
if (n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(true)
{
if (n > 1)
{
while (true)
{
if (d * d > n)
{
while (true)
{
if(n==1)
return 0;
for (int i = 2; i <= n; i++)
{
bool check = true;
for (int j = 2; j < i; j++)
{
if(i == j )
continue;
// 5
if (i % j == 0)
{
check = false;
break;
}
}
if(check == false)
{
break;
}
if(i==n)
{
cout << n << " ";
return 0;
}
if(n%i == 0)
{
cout << i << " ";
n = n/i;
}
}
}
}
else
{
while(true)
{
if(n%d==0)
{
n /= d;
int z = d;
for (int i = 2; i <= z; i++)
{
bool check = true;
for (int j = 2; j < i; j++)
{
if(i == j )
continue;
// 5
if (i % j == 0)
{
check = false;
break;
}
}
if(check == false)
{
continue;
}
if(i==z)
{
cout << z << " ";
break;
}
if(z%i == 0)
{
cout << i << " ";
z = z/i;
}
}
}
else
{
d+=1;
break;
}
}
}
}
}
else
{
break;
}
}
}
} |
# 2014967, 2024-09-28 09:21:23, TTTTTTxTTTTTTTTTTT (0%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,d;
d=2;
cin >> N;
if(N<2)cout << "No prime factors for numbers less than 2.";
while(true){
if(N>1){
if(d*d>N){
for(int i=2;i<N;){
if(N/i==1){
cout << i << " " << N;
}
else if(N%i==0){
cout << i << " ";
N /= i;
}
else{
i++;
}
}
}
else if(N%d==0){
for(int i=2;i<d;){
if(d/i==1){
cout << i << " " << d;
}
else if(d%i==0){
cout << i << " ";
d /= i;
}
else{
i++;
}
}
}
else{
d += 1;
}
}
}
} | # 2014969, 2024-09-28 09:21:43, TTTTTTxTTTTTTTTTTT (0%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,d;
d=2;
cin >> N;
if(N<2)cout << "No prime factors for numbers less than 2.";
while(true){
if(N>1){
if(d*d>N){
for(int i=2;i<N;){
if(N/i==1){
cout << i << " " << N;
}
else if(N%i==0){
cout << i << " ";
N /= i;
}
else{
i++;
}
}
}
else if(N%d==0){
for(int i=2;i<d;){
if(d/i==1){
cout << i << " " << d;
}
else if(d%i==0){
cout << i << " ";
d /= i;
}
else{
i++;
}
}
}
else{
d += 1;
}
}
}
} | # 2014984, 2024-09-28 09:23:11, TTTTTTTTTTTTTTTTTT (0%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,d;
d=2;
cin >> N;
if(N<2)cout << "No prime factors for numbers less than 2.";
while(true){
if(N>1){
if(d*d>N){
for(int i=2;i<N;){
if(N/i==1){
cout << i << " " << N;
break;
}
else if(N%i==0){
cout << i << " ";
N /= i;
}
else{
i++;
}
}
}
else if(N%d==0){
for(int i=2;i<d;){
if(d/i==1){
cout << i << " " << d;
break;
}
else if(d%i==0){
cout << i << " ";
d /= i;
}
else{
i++;
}
}
}
else{
d += 1;
}
}
}
} | # 2015010, 2024-09-28 09:26:57, PTTTTTTTTTTTTTTTPP (16%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,d;
d=2;
cin >> N;
if(N<2)cout << "No prime factors for numbers less than 2.";
while(N>1){
if(d*d>N){
for(int i=2;i<N;){
if(N/i==1){
cout << i << " " << N;
break;
}
else if(N%i==0){
cout << i << " ";
N /= i;
}
else{
i++;
}
}
}
else if(N%d==0){
for(int i=2;i<d;){
if(d/i==1){
cout << i << " " << d;
break;
}
else if(d%i==0){
cout << i << " ";
d /= i;
}
else{
i++;
}
}
}
else{
d += 1;
}
}
} | # 2015059, 2024-09-28 09:32:58, PP-P--P---TTTTTTPP (33%)
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,d;
d=2;
cin >> N;
if(N<2)cout << "No prime factors for numbers less than 2.";
while(N>1){
if(d*d>N){
for(int i=2;i<N;){
if(N/i==1){
//cout << i << " " << N;
break;
}
else if(N%i==0){
cout << i << " ";
N /= i;
}
else{
i++;
}
}
cout << N;
break;
}
else if(N%d==0){
for(int i=2;i<d;){
if(d/i==1){
//cout << i << " " << d;
break;
}
else if(d%i==0){
cout << i << " ";
d /= i;
}
else{
i++;
}
}
cout << d;
break;
}
else{
d += 1;
}
}
} | # 2016036, 2024-09-28 11:06:23, P-P--P-P-P--P---PP (44%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N,d;
d=2;
cin >> N;
if(2>N)cout << "No prime factors for numbers less than 2.";
while(N>1){
// cout << "in loop\n";
if(d*d>N){
cout << "in 2\n";
for(int i=2;i<d;){
// cout << "In for\n";
if(d/i==1){
cout << i << " " << d;
break;
}
else if(d%i==0){
cout << i << " ";
d /= i;
}
else{
i++;
}
}
if(d/d==1){
cout << d;
break;
}
}
else if(N%d==0){
// cout << "in 1\n";
for(int i=2;i<N;){
// cout << "In for\n";
if(N/i==1){
cout << i << " " << N;
break;
}
else if(N%i==0){
cout << i << " ";
N /= i;
}
else{
i++;
}
}
if(N/N==1){
cout << N;
break;
}
}
else{
d += 1;
}
}
} | # 2016058, 2024-09-28 11:09:04, P-P--P-P-P--P---PP (44%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N,d;
d=2;
cin >> N;
if(2>N)cout << "No prime factors for numbers less than 2.";
while(N>1){
// cout << "in loop\n";
if(d*d>N){
// cout << "in 2\n";
for(int i=2;i<d;){
// cout << "In for\n";
if(d/i==1){
cout << i << " " << d;
break;
}
else if(d%i==0){
cout << i << " ";
d /= i;
}
else{
i++;
}
}
if(d/d==1){
//cout << d;
break;
}
}
else if(N%d==0){
// cout << "in 1\n";
for(int i=2;i<N;){
// cout << "In for\n";
if(N/i==1){
cout << i << " " << N;
break;
}
else if(N%i==0){
cout << i << " ";
N /= i;
}
else{
i++;
}
}
if(N/N==1){
cout << N;
break;
}
}
else{
d += 1;
}
}
} | # 2016063, 2024-09-28 11:09:31, P---------------PP (16%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N,d;
d=2;
cin >> N;
if(2>N)cout << "No prime factors for numbers less than 2.";
} | # 2016065, 2024-09-28 11:09:52, P-P--P-P-P--P---PP (44%)
#include <bits/stdc++.h>
using namespace std;
int main(){
long long N,d;
d=2;
cin >> N;
if(2>N)cout << "No prime factors for numbers less than 2.";
while(N>1){
// cout << "in loop\n";
if(d*d>N){
// cout << "in 2\n";
for(int i=2;i<d;){
// cout << "In for\n";
if(d/i==1){
cout << i << " " << d;
break;
}
else if(d%i==0){
cout << i << " ";
d /= i;
}
else{
i++;
}
}
if(d/d==1){
//cout << d;
break;
}
}
else if(N%d==0){
// cout << "in 1\n";
for(int i=2;i<N;){
// cout << "In for\n";
if(N/i==1){
cout << i << " " << N;
break;
}
else if(N%i==0){
cout << i << " ";
N /= i;
}
else{
i++;
}
}
if(N/N==1){
cout << N;
break;
}
}
else{
d += 1;
}
}
} |
# 2015457, 2024-09-28 10:08:22, -T-TT-T-T-TT-TTT-- (0%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
bool flagg =true;
cin >> n;
int d = 2;
if (n < 2)
cout << "No prime factors for numbers less than 2.";
else
{
con:
while (n > 1)
{
if (d * d > n)
{
for (int i = 2; i < ceil(sqrt(n)); ++i)
{
if (n % i == 0)
{
cout << i << " ";
flagg = false;
}
}
}
else
{
while(n % d == 0)
{
n /= d;
cout << d<<" ";
}
if (n % d != 0)
{
d += 1;
goto con;
}
}
}
}
if(flagg) cout<<n;
return 0;
} | # 2015466, 2024-09-28 10:09:19, PTPTTPTPTPTTPTTTPP (44%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
cin >> n;
int d = 2;
if (n < 2)
cout << "No prime factors for numbers less than 2.";
else
{
con:
while (n > 1)
{
if (d * d > n)
{
for (int i = 2; i <=n; ++i)
{
if (n % i == 0)
{
cout << i << " ";
}
}
}
else
{
while(n % d == 0)
{
n /= d;
cout << d<<" ";
}
if (n % d != 0)
{
d += 1;
goto con;
}
}
}
}
return 0;
} | # 2015841, 2024-09-28 10:48:29, Compilation error (0%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
bool prime = true;
cin >> n;
int d = 2;
if (n < 2)
cout << "No prime factors for numbers less than 2.";
else
{
con:
while (n > 1)
{
if (d * d > n)
{
for (int i = 2; i <ceil(sqrt(n)); ++i)
{
if (n % i == 0)
{
cout << i << " ";
prime = false;
}
}
}
else
{
while(n % d == 0)
{
n /= d;
cout << d<<" ";#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
bool prime = true;
cin >> n;
int d = 2;
if (n < 2)
cout << "No prime factors for numbers less than 2.";
else
{
con:
while (n > 1)
{
if (d * d > n)
{
for (int i = 2; i <ceil(sqrt(n)); ++i)
{
if (n % i == 0)
{
cout << i << " ";
prime = false;
}
}
}
else
{
while(n % d == 0)
{
n /= d;
cout << d<<" ";
}
if (n % d != 0)
{
d += 1;
goto con;
}
}
}
}
if(prime) cout<<n;
return 0;
}
}
if (n % d != 0)
{
d += 1;
goto con;
}
}
}
}
if(prime) cout<<n;
return 0;
}#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
bool prime = true;
cin >> n;
int d = 2;
if (n < 2)
cout << "No prime factors for numbers less than 2.";
else
{
con:
while (n > 1)
{
if (d * d > n)
{
for (int i = 2; i <ceil(sqrt(n)); ++i)
{
if (n % i == 0)
{
cout << i << " ";
prime = false;
}
}
}
else
{
while(n % d == 0)
{
n /= d;
cout << d<<" ";
}
if (n % d != 0)
{
d += 1;
goto con;
}
}
}
}
if(prime) cout<<n;
return 0;
} | # 2015843, 2024-09-28 10:48:44, -T-TT-T-T-TT-TTT-- (0%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
bool prime = true;
cin >> n;
int d = 2;
if (n < 2)
cout << "No prime factors for numbers less than 2.";
else
{
con:
while (n > 1)
{
if (d * d > n)
{
for (int i = 2; i <ceil(sqrt(n)); ++i)
{
if (n % i == 0)
{
cout << i << " ";
prime = false;
}
}
}
else
{
while(n % d == 0)
{
n /= d;
cout << d<<" ";
}
if (n % d != 0)
{
d += 1;
goto con;
}
}
}
}
if(prime) cout<<n;
return 0;
} | # 2015847, 2024-09-28 10:49:08, PTPTTPTPTPTTPTTTPP (44%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
cin >> n;
int d = 2;
if (n < 2)
cout << "No prime factors for numbers less than 2.";
else
{
con:
while (n > 1)
{
if (d * d > n)
{
for (int i = 2; i <=n; ++i)
{
if (n % i == 0)
{
cout << i << " ";
}
}
}
else
{
while(n % d == 0)
{
n /= d;
cout << d<<" ";
}
if (n % d != 0)
{
d += 1;
goto con;
}
}
}
}
return 0;
} | # 2016479, 2024-09-28 11:44:22, -P-PTPPPTPTPTTTT-- (38%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
cin >> n;
int d = 2;
bool prime = true;
for (int i = 2; i < ceil(sqrt(n)); ++i)
{
if (n % i == 0)
{
prime = false;
}
}
if (prime)
cout << n;
else
{
if (n < 2)
cout << "No prime factors for numbers less than 2.";
else
{
con:
while (n > 1)
{
if (d * d > n)
{
for (int i = 2; i <=n; ++i)
{
if (n % i == 0)
{
cout << i << " ";
}
}
}
else
{
while(n % d == 0)
{
n /= d;
cout << d<<" ";
}
if (n % d != 0)
{
d += 1;
goto con;
}
}
}
}
}
return 0;
} | # 2016641, 2024-09-28 11:53:56, PTPTTPTPTPTTPTTTPP (44%)
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
cin >> n;
int d = 2;
if (n < 2)
cout << "No prime factors for numbers less than 2.";
else
{
con:
while (n > 1)
{
if (d * d > n)
{
for (int i = 2; i <=n; ++i)
{
if (n % i == 0)
{
cout << i << " ";
}
}
}
else
{
while(n % d == 0)
{
n /= d;
cout << d<<" ";
}
if (n % d != 0)
{
d += 1;
goto con;
}
}
}
}
return 0;
} |
# 2014924, 2024-09-28 09:15:53, --P------P-------- (11%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2";
}
else
{
while(N>1)
{
if(d*d > N)
cout << N;
break;
}
while(N% d == 0)
{
N/=d;
cout << d<<" ";
}
}
} | # 2014991, 2024-09-28 09:23:59, -P---------------- (5%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2";
}
else
{
if( N >1)
{
if(d*d > N)
{
cout << d << " ";
}
else
{
if(N% d == 0)
{
N /= d;
cout << d << " ";
}else
{
d+=1;
}
}
}
}
} | # 2015008, 2024-09-28 09:26:36, -PP--P-P-PTTTTTT-- (27%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2";
}
else
{
while( N >1)
{
if(d*d > N)
{
cout << d << " ";
break;
}
else
{
if(N% d == 0)
{
N /= d;
cout << d << " ";
}else
{
d+=1;
}
}
}
}
} | # 2015063, 2024-09-28 09:33:15, -PP--P-P-PTTTTTT-- (27%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2";
}
else
{
while( N >1)
{
if(d*d > N)
{
cout << d << " ";
break;
}
else
{
if(N% d == 0)
{
N /= d;
cout << d << " ";
}else
{
d+=1;
}
}
}
}
} | # 2015077, 2024-09-28 09:33:36, --P------P-------- (11%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2";
}
else
{
while(N>1)
{
if(d*d > N)
cout << N;
break;
}
while(N% d == 0)
{
N/=d;
cout << d<<" ";
}
}
} | # 2015165, 2024-09-28 09:41:35, --P------P-------- (11%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2.";
}
else
{
while(N>1)
{
if(d*d > N)
cout << N;
break;
}
while(N% d == 0)
{
N/=d;
cout << d<<" ";
}
}
} | # 2015168, 2024-09-28 09:41:51, -PP--P-P-PTTTTTT-- (27%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2.";
}
else
{
while( N >1)
{
if(d*d > N)
{
cout << d << " ";
break;
}
else
{
if(N% d == 0)
{
N /= d;
cout << d << " ";
}else
{
d+=1;
}
}
}
}
} | # 2015227, 2024-09-28 09:47:15, -PP--P-P-PTTTTTT-- (27%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2";
}
else
{
while( N >=1)
{
if(d*d > N)
{
cout << d << " ";
break;
}
else
{
if(N% d == 0)
{
N /= d;
cout << d << " ";
}else
{
d+=1;
}
}
}
}
} | # 2015229, 2024-09-28 09:47:22, -PP--P-P-PTTTTTT-- (27%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2.";
}
else
{
while( N >=1)
{
if(d*d > N)
{
cout << d << " ";
break;
}
else
{
if(N% d == 0)
{
N /= d;
cout << d << " ";
}else
{
d+=1;
}
}
}
}
} | # 2015231, 2024-09-28 09:47:33, -PP--P-P-PTTTTTT-- (27%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2.";
}
else
{
while( N >=1)
{
if(d*d > N)
{
cout << d << " ";
break;
}
else
{
if(N% d == 0)
{
N /= d;
cout << d << " ";
}else
{
d+=1;
}
}
}
}
} | # 2015323, 2024-09-28 09:55:27, -PP--P-P-P-------- (27%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2.";
}
else
{
if(N%2 != 1)
{
while( N >=1)
{
if(d*d > N)
{
cout << d << " ";
break;
}
else
{
if(N% d == 0)
{
N /= d;
cout << d << " ";
}else
{
d+=1;
}
}
}
}
else
{
cout<< "N";
}
}
} | # 2015335, 2024-09-28 09:56:17, -PPP-PPP-P-------- (38%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2.";
}
else
{
if(N%2 != 1)
{
while( N >=1)
{
if(d*d > N)
{
cout << d << " ";
break;
}
else
{
if(N% d == 0)
{
N /= d;
cout << d << " ";
}else
{
d+=1;
}
}
}
}
else
{
cout<< N;
}
}
} | # 2015352, 2024-09-28 09:57:58, -P-PTTPTT--------- (16%)
#include <iostream>
using namespace std;
int main()
{
int d, N;
cin >> N;
d = 2;
if (N < 2)
{
cout << "No prime factor for numbers less than 2.";
}
else
{
if (N % 2 != 1)
{
while (N >= 1)
{
if (d * d > N)
{
cout << d << " ";
break;
}
else
{
if (N % 2 != 1)
{
cout << N;
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
}
}
}
}
}
else
{
cout << N;
}
}
} | # 2015358, 2024-09-28 09:58:28, -P-P--P----------- (16%)
#include <iostream>
using namespace std;
int main()
{
int d, N;
cin >> N;
d = 2;
if (N < 2)
{
cout << "No prime factor for numbers less than 2.";
}
else
{
if (N % 2 != 1)
{
while (N >= 1)
{
if (d * d > N)
{
cout << d << " ";
break;
}
else
{
if (N % 2 != 1)
{
cout << N;
break;
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
}
}
}
}
}
else
{
cout << N;
}
}
} | # 2016424, 2024-09-28 11:41:25, -P-P--P----------- (16%)
#include <iostream>
using namespace std;
int main()
{
int d, N;
cin >> N;
d = 2;
if (N < 2)
{
cout << "No prime factor for numbers less than 2.";
}
else
{
if (N % 2 != 1)
{
if(N > 1)
{
while(d * d > N)
{
if (d * d > N)
{
cout << d << " ";
break;
}
else
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
}
}
}
}
}
else
{
cout << N;
}
}
} | # 2016493, 2024-09-28 11:45:19, -PP--P-P-PTTTTTT-- (27%)
#include<iostream>
using namespace std;
int main()
{
int d,N;
cin >> N;
d = 2;
if( N < 2)
{
cout<< "No prime factor for numbers less than 2.";
}
else
{
while( N >=1)
{
if(d*d > N)
{
cout << d << " ";
break;
}
else
{
if(N% d == 0)
{
while(N% d == 0)
{
N /= d;
cout << d << " ";
break;
}
}
else if( N% d != 0)
{
d+=1;
}
else
{
cout << "N" << " ";
break;
}
}
}
}
} | # 2016726, 2024-09-28 11:57:48, -PP--P-P-PTTTTTT-- (27%)
#include <iostream>
using namespace std;
int main()
{
int d, N;
cin >> N;
d = 2;
if (N < 2)
{
cout << "No prime factor for numbers less than 2.";
}
else
{
while(N > 1)
{
if (d * d > N)
{
cout << d << " ";
break;
}
else
{
if (N % d == 0)
{
N /= d;
cout << d << " ";
}
else
{
d += 1;
}
}
}
}
} |
# 2015046, 2024-09-28 09:31:55, PTPTTPTPTPTTTTTTPP (38%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n > 1){//yes n>1
if(d*d > n){ // yes d*d > n
//cout prime number " " n
cout << n <<" "; // correct
}else{ // no d*d > n
while(n%d == 0){ //' yes N%d == 0
n /= d;
//cout prime number d
cout << d <<" ";
}
//no N%d == 0
//cout << "no nd";
}
//cout << "break ma while nok";
d+=1; //correct
}// no while
// not n > 1
//case 1000000007 if fault
// 2347821953524590300 is fault
}
} | # 2016068, 2024-09-28 11:10:00, P-TTTTTTTTTTTTTTPP (16%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n>1){
if(d*d > n){
cout << n;
}
while(n%d == 0){
n /= d;
cout << d;
d+=1;
}
}
//no while
}
} | # 2016127, 2024-09-28 11:15:56, PTPTTTTTTPTTTTTTPP (27%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n > 1){//yes n>1
if(d*d > n){ // yes d*d > n
//cout prime number " " n
cout << n <<" "; // correct
}else{ // no d*d > n
while(n%d == 0){ //' yes N%d == 0
n /= d;
//cout prime number d
cout << d <<" ";
}
//no N%d == 0
//cout << "no nd";
}
//cout << "break ma while nok";
if(n%d == 0){
d+=1;
}
}// no while
// not n > 1
//case 1000000007 if fault
// 2347821953524590300 is fault
}
} | # 2016134, 2024-09-28 11:16:19, PTPTTTTTTPTTTTTTPP (27%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n > 1){//yes n>1
if(d*d > n){ // yes d*d > n
//cout prime number " " n
cout << n <<" "; // correct
}else{ // no d*d > n
while(n%d == 0){ //' yes N%d == 0
n /= d;
//cout prime number d
cout << d <<" ";
}
//no N%d == 0
//cout << "no nd";
if(n%d == 0){
d+=1;
}
}
//cout << "break ma while nok";
}// no while
// not n > 1
//case 1000000007 if fault
// 2347821953524590300 is fault
}
} | # 2016139, 2024-09-28 11:16:55, PTPTTTTTTPTTTTTTPP (27%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n > 1){//yes n>1
if(d*d > n){ // yes d*d > n
//cout prime number " " n
cout << n <<" "; // correct
}else{ // no d*d > n
while(n%d == 0){ //' yes N%d == 0
n /= d;
//cout prime number d
cout << d <<" ";
}
//no N%d == 0
//cout << "no nd";
d;
}
//cout << "break ma while nok";
if(n%d == 0){
d+=1;
}
}// no while
// not n > 1
//case 1000000007 if fault
// 2347821953524590300 is fault
}
} | # 2016186, 2024-09-28 11:22:09, PT-P--P---------PP (27%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n > 1){//yes n>1
if(d*d > n){ // yes d*d > n
//cout prime number " " n
cout << n <<" "; // correct
}else{ // no d*d > n
while(n%d == 0){ //' yes N%d == 0
n /= d;
//cout prime number d
cout << d <<" ";
}
if(n%d != 0){
d+=1;
cout << n;
break;
}
//no N%d == 0
//cout << "no nd";
}
//cout << "break ma while nok";
}// no while
}
} | # 2016377, 2024-09-28 11:38:02, PTPTTPTPTPTTTTTTPP (38%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n > 1){//yes n>1
if(d*d > n){ // yes d*d > n
//cout prime number " " n
cout << n <<" "; // correct
}else{ // no d*d > n
while(n%d == 0){ //' yes N%d == 0
n /= d;
//cout prime number d
cout << d <<" ";
}
//no N%d == 0
//cout << "no nd";
}
//cout << "break ma while nok";
d+=1; //correct
}// no while
// not n > 1
//case 1000000007 if fault
// 2347821953524590300 is fault
}
} | # 2016552, 2024-09-28 11:49:33, PTPTTTTTTPTTTTTTPP (27%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n > 1){//yes n>1
if(d*d > n){ // yes d*d > n
//cout prime number " " n
cout << n <<" "; // correct
}else{ // no d*d > n
while(n%d == 0){ //' yes N%d == 0
n /= d;
//cout prime number d
cout << d <<" ";
}
}
}// no while
d+=1;
}
} | # 2016633, 2024-09-28 11:53:31, PTPTTPTPTPTTTTTTPP (38%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n>1){
if(d*d > n){
cout << n << " ";
}
else{
while(n%d == 0){
n /= d;
cout << d << " ";
}
d += 1;
}
}
}
} | # 2016647, 2024-09-28 11:54:13, PTPTTPTPTPTTTTTTPP (38%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n>1){
if(d*d > n){
cout << n << " ";
}
else{
while(n%d == 0){
n /= d;
cout << d << " ";
}
}d += 1;
}
}
} | # 2016652, 2024-09-28 11:54:27, PTPTTTTTTPTTTTTTPP (27%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n>1){
if(d*d > n){
cout << n << " ";
}
else{
while(n%d == 0){
n /= d;
cout << d << " ";
}
}
}d += 1;
}
} | # 2016788, 2024-09-28 11:59:23, PPP------P------PP (33%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}else{ //n<2
while(n>1){
if(d*d > n){
cout << n << " ";
}
else{
while(n%d == 0){
n /= d;
cout << d << " ";
}
}
d += 1;
break;
}
}
} |
# 2014927, 2024-09-28 09:16:13, ------------------ (0%)
#include <bits/stdc++.h>
using namespace std ;
int main () {
int n ;
int i = 0;
cin >> n ;
string number = to_string(n) ;
if (number.length() <= 19){
int d = 2 ;
if (n > 2){
cout << "No prime factors for numbers less than 2." ;
} else {
while (n > 1) {
if (d*d > n){
while (d * d <= n){
if (n % d == 0){
n /= d;
while (i < n){
while (i % d == 0){
cout << i << " " ;
}
i++ ;
}
} else {
d += 1 ;
}
}
} else {
while (i < n){
while (i % n == 0){
cout << i << " " ;
}
i++ ;
}
}
}
}
}
} | # 2014932, 2024-09-28 09:16:52, PTTTTTTTTTTTTTTTPP (16%)
#include <bits/stdc++.h>
using namespace std ;
int main () {
int n ;
int i = 0;
cin >> n ;
string number = to_string(n) ;
if (number.length() <= 19){
int d = 2 ;
if (n < 2){
cout << "No prime factors for numbers less than 2." ;
} else {
while (n > 1) {
if (d*d > n){
while (d * d <= n){
if (n % d == 0){
n /= d;
while (i < n){
while (i % d == 0){
cout << i << " " ;
}
i++ ;
}
} else {
d += 1 ;
}
}
} else {
while (i < n){
while (i % n == 0){
cout << i << " " ;
}
i++ ;
}
}
}
}
}
} | # 2015903, 2024-09-28 10:55:30, Compilation error (0%)
#include <bits/stdc++.h>
using namespace std ;
int main () {
int n ;
int i = 2;
cin >> n ;
string number = to_string(n) ;
if (number.length() <= 19){
int d = 2 ;
if (n < 2){
cout << "No prime factors for numbers less than 2." ;
} else {
while (n > 1) {
if (d*d > n){
while (d * d <= n){
if (n % d == 0){
while (n % d == 0){
n /= d;
while (i < n){
while (d % i == 0){
cout << i << " " ;
d /= i
}
i++ ;
}
}
} else {
d += 1 ;
}
}
} else {
while (i < n){
while (n % i == 0){
cout << i << " " ;
n /= i ;
}
i++ ;
}
}
}
}
}
} | # 2015907, 2024-09-28 10:55:51, PTPTTPTPTPTTTTTTPP (38%)
#include <bits/stdc++.h>
using namespace std ;
int main () {
int n ;
int i = 2;
cin >> n ;
string number = to_string(n) ;
if (number.length() <= 19){
int d = 2 ;
if (n < 2){
cout << "No prime factors for numbers less than 2." ;
} else {
while (n > 1) {
if (d*d > n){
while (d * d <= n){
if (n % d == 0){
while (n % d == 0){
n /= d;
while (i < n){
while (d % i == 0){
cout << i << " " ;
d /= i ;
}
i++ ;
}
}
} else {
d += 1 ;
}
}
} else {
while (i < n){
while (n % i == 0){
cout << i << " " ;
n /= i ;
}
i++ ;
}
}
}
}
}
} | # 2015921, 2024-09-28 10:56:44, PTTTTTTTTPTTTTTTPP (22%)
#include <bits/stdc++.h>
using namespace std ;
int main () {
int n ;
int i = 2;
cin >> n ;
string number = to_string(n) ;
if (number.length() <= 19){
int d = 2 ;
if (n < 2){
cout << "No prime factors for numbers less than 2." ;
} else {
while (n > 1) {
if (d*d > n){
while (d * d <= n){
if (n % d == 0){
while (n % d == 0){
n /= d;
while (i < sqrt(n)){
while (d % i == 0){
cout << i << " " ;
d /= i ;
}
i++ ;
}
}
} else {
d += 1 ;
}
}
} else {
while (i < sqrt(n)){
while (n % i == 0){
cout << i << " " ;
n /= i ;
}
i++ ;
}
}
}
}
}
} | # 2015932, 2024-09-28 10:57:12, PTPTTPTPTPTTTTTTPP (38%)
#include <bits/stdc++.h>
using namespace std ;
int main () {
int n ;
int i = 2;
cin >> n ;
string number = to_string(n) ;
if (number.length() <= 19){
int d = 2 ;
if (n < 2){
cout << "No prime factors for numbers less than 2." ;
} else {
while (n > 1) {
if (d*d > n){
while (d * d <= n){
if (n % d == 0){
while (n % d == 0){
n /= d;
while (i < n){
while (d % i == 0){
cout << i << " " ;
d /= i ;
}
i++ ;
}
}
} else {
d += 1 ;
}
}
} else {
while (i < n){
while (n % i == 0){
cout << i << " " ;
n /= i ;
}
i++ ;
}
}
}
}
}
} | # 2016041, 2024-09-28 11:07:37, PxTxTTxTTTTTTTTTPP (16%)
#include <bits/stdc++.h>
using namespace std ;
int main () {
int n ;
int i = 0;
cin >> n ;
int arr[25] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97} ;
string number = to_string(n) ;
if (number.length() <= 19){
int d = 2 ;
if (n < 2){
cout << "No prime factors for numbers less than 2." ;
} else {
while (n > 1) {
if (d*d <= n){
while (d * d <= n){
if (n % d == 0){
while (n % d == 0){
n /= d;
while (i < 25){
while (d % arr[i] == 0){
cout << arr[i] << " " ;
d /= arr[i] ;
}
i++ ;
}
cout << d;
}
} else {
d += 1 ;
}
}
} else {
while (i < 25){
while (n % i == 0){
cout << arr[i] << " " ;
n /= arr[i] ;
}
i++ ;
}
cout << n ;
}
}
}
}
} | # 2016390, 2024-09-28 11:39:28, PxPTTTTTTPTTTTTTPP (27%)
#include <bits/stdc++.h>
using namespace std ;
int main () {
int n ;
int i = 0;
int nub = 0;
cin >> n ;
int arr[25] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97} ;
string number = to_string(n) ;
if (number.length() <= 19){
int d = 2 ;
int e = 2 ;
if (n < 2){
cout << "No prime factors for numbers less than 2." ;
} else {
while (n > 1) {
if (d*d <= n){
while (d * d <= n){
if (n % d == 0){
while (n % d == 0){
n /= d;
while (i < 25){
while (d % arr[i] == 0){
cout << arr[i] << " " ;
d /= arr[i] ;
nub++ ;
if (d == 1){
break ;
}
}
i++ ;
if (d < arr[i] || d == 1){
break ;
}
}
i = 0 ;
d = e ;
}
} else {
e += 1 ;
}
}
} else {
while (i < 25){
while (n % i == 0){
cout << arr[i] << " " ;
n /= arr[i] ;
if (n == 1){
break ;
}
}
i++ ;
}
cout << n ;
}
}
}
}
} | # 2016464, 2024-09-28 11:43:25, PxPxTTxTTPTTTTTTPP (27%)
#include <bits/stdc++.h>
using namespace std ;
int main () {
int n ;
int i = 0;
int nub = 0;
cin >> n ;
int arr[25] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97} ;
string number = to_string(n) ;
if (number.length() <= 19){
int d = 2 ;
int e = 2 ;
if (n < 2){
cout << "No prime factors for numbers less than 2." ;
} else {
while (n > 1) {
if (e * e <= n){
while (e * e <= n){
if (n % e == 0){
while (n % d == 0){
n /= d;
while (i < 25){
while (d % arr[i] == 0){
cout << arr[i] << " " ;
d /= arr[i] ;
nub++ ;
if (d == 1){
break ;
}
}
i++ ;
if (d < arr[i] || d == 1){
break ;
}
}
i = 0 ;
d = e ;
}
} else {
e += 1 ;
}
}
} else {
while (i < 25){
while (n % i == 0){
cout << arr[i] << " " ;
n /= arr[i] ;
if (n == 1){
break ;
}
}
i++ ;
}
cout << n ;
}
}
}
}
} |
# 2017746, 2024-09-28 14:03:42, P-TxTTxTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
string result = "";
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while(N > 1){
if(d * d > N){
cout << N;
while(N % 2 == 0){
cout << "2 ";
N = N / 2;
}
while(N % 3 == 0){
cout << "3 ";
N = N / 3;
}
while(N % 5 == 0){
cout << "5 ";
N = N / 5;
}
while(N % 7 == 0){
cout << "7 ";
N = N / 7;
}
}else if(N % d == 0){
while(N % d == 0){
N /= d;
while(d % 2 == 0){
cout << "2 ";
d = d / 2;
}
while(d % 3 == 0){
cout << "3 ";
d = d / 3;
}
while(d % 5 == 0){
cout << "5 ";
d = d / 5;
}
while(d % 7 == 0){
cout << "7 ";
d = d / 7;
}
}
}else{
d += 1;
continue;
}
}
}
} | # 2017923, 2024-09-28 14:16:39, P-Px-PxP-PTTTTTTPP (38%)
#include<bits/stdc++.h>
using namespace std;
bool isprime(int n){
if(n <= 1) return false;
if(n == 0) return false;
if(n % 2 == 0) return false;
for(int i = 3; i < sqrt(n); i+= 2){
if(n % i == 0){
return false;
}
}
return true;
}
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}else{
while(N > 1){
if(d * d > N){
cout << N;
while(N % 2 == 0){
cout << "2 ";
N = N / 2;
}
while(N % 3 == 0){
cout << "3 ";
N = N / 3;
}
while(N % 5 == 0){
cout << "5 ";
N = N / 5;
}
while(N % 7 == 0){
cout << "7 ";
N = N / 7;
}
}else if(N % d == 0){
while(N % d == 0){
N /= d;
int spare_d = d;
while(spare_d % 2 == 0){
cout << "2 ";
spare_d = spare_d / 2;
}
while(spare_d % 3 == 0){
cout << "3 ";
spare_d = spare_d / 3;
}
while(spare_d % 5 == 0){
cout << "5 ";
spare_d = spare_d / 5;
}
while(spare_d % 7 == 0){
cout << "7 ";
spare_d = spare_d / 7;
}
}
d += 1;
continue;
}else{
d += 1;
continue;
}
}
}
} |
# 2015762, 2024-09-28 10:40:07, PP-P--P---TTTTTTPP (33%)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string ans,str;
int n,k=2;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
start:
if(n > 1)
{
if(d*d > n)
{
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
}
else
{
modD:
if(n % d == 0)
{
n /= d;
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
k=2;
goto modD;
}
else
{
d += 1;
goto start;
}
}
}
else return 0;
}
return 0;
} | # 2015795, 2024-09-28 10:43:59, PP-P--P----T----PP (33%)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string ans,str;
long n,k=2;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
start:
if(n > 1)
{
if(d*d > n)
{
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
}
else
{
modD:
if(n % d == 0)
{
n /= d;
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
k=2;
goto modD;
}
else
{
d += 1;
goto start;
}
}
}
else return 0;
}
return 0;
} | # 2015800, 2024-09-28 10:44:19, PP-P--P---TTTTTTPP (33%)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string ans,str;
int n,k=2;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
start:
if(n > 1)
{
if(d*d > n)
{
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
}
else
{
modD:
if(n % d == 0)
{
n /= d;
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
k=2;
goto modD;
}
else
{
d += 1;
goto start;
}
}
}
else return 0;
}
return 0;
} | # 2016076, 2024-09-28 11:10:43, PPxPxxPxxxxTxxxxPP (33%)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string ans,str;
long n,k=2;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
start:
if(n > 1)
{
if(d*d > n)
{
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
}
else
{
modD:
if(n % d == 0)
{
n /= d;
while(d != 1)
{
if(d%k == 0)
{
d = d/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
k=2;
goto modD;
}
else
{
d += 1;
goto start;
}
}
}
else return 0;
}
return 0;
} | # 2016105, 2024-09-28 11:13:37, PPTPTTPTTTTTTTTTPP (33%)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string ans,str;
long n,k=2;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
start:
if(n > 1)
{
if(d*d > n)
{
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
}
else
{
modD:
if(n % d == 0)
{
n /= d;
while(d != 1)
{
if(d%k == 0)
{
d = d/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
ans.erase(0,ans.length());
k=2;
goto modD;
}
else
{
d += 1;
goto start;
}
}
}
else return 0;
}
return 0;
} | # 2016435, 2024-09-28 11:41:58, PPTTTTTTTTTTTTTTPP (22%)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string ans,str;
long n,k=2;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
start:
if(n > 1)
{
if(d*d > n)
{
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k+=2;
}
cout << ans;
}
else
{
modD:
if(n % d == 0)
{
n /= d;
while(d != 1)
{
if(d%k == 0)
{
d = d/k;
str = to_string(k);
ans = ans + str + " ";
}
else k+=2;
}
cout << ans;
ans.erase(0,ans.length());
k=2;
goto modD;
}
else
{
d += 1;
goto start;
}
}
}
else return 0;
}
return 0;
} | # 2016441, 2024-09-28 11:42:19, PPTPTTPTTTTTTTTTPP (33%)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string ans,str;
long n,k=2;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
start:
if(n > 1)
{
if(d*d > n)
{
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
}
else
{
modD:
if(n % d == 0)
{
n /= d;
while(d != 1)
{
if(d%k == 0)
{
d = d/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
}
cout << ans;
ans.erase(0,ans.length());
k=2;
goto modD;
}
else
{
d += 1;
goto start;
}
}
}
else return 0;
}
return 0;
} | # 2016550, 2024-09-28 11:49:28, PPTPTTPTTTTTTTTTPP (33%)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string ans,str;
long n,k=2;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
start:
if(n > 1)
{
if(d*d > n)
{
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
if(k >= 9) k = n;
}
cout << ans;
}
else
{
modD:
if(n % d == 0)
{
n /= d;
while(d != 1)
{
if(d%k == 0)
{
d = d/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
if(k >= 9) k = d;
}
cout << ans;
ans.erase(0,ans.length());
k=2;
goto modD;
}
else
{
d += 1;
goto start;
}
}
}
else return 0;
}
return 0;
} | # 2016591, 2024-09-28 11:51:38, PPTPTTPTTTTTTTTTPP (33%)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
string ans,str;
long n,k=2;
cin >> n;
int d = 2;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
start:
if(n > 1)
{
if(d*d > n)
{
while(n != 1)
{
if(n%k == 0)
{
n = n/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
if(k >= 8) k = n;
}
cout << ans;
}
else
{
modD:
if(n % d == 0)
{
n /= d;
while(d != 1)
{
if(d%k == 0)
{
d = d/k;
str = to_string(k);
ans = ans + str + " ";
}
else k++;
if(k >= 8) k = d;
}
cout << ans;
ans.erase(0,ans.length());
k=2;
goto modD;
}
else
{
d += 1;
goto start;
}
}
}
else return 0;
}
return 0;
} |
# 2017088, 2024-09-28 12:54:30, PPTPTTPTTTTTTTTTPP (33%)
#include <iostream>
#include <string>
using namespace std ;
int main () {
long int N = 0 ;
cin >> N ; cin.ignore() ;
long int d = 2 ;
if ( N < 2 ) {
cout << "No prime factors for numbers less than 2." << endl ;
} else {
while ( N > 1 ) {
if (( (d*d) > N)) {
for ( long int i = 2 ; N > 1 ; i++ ){
for ( long int j = i ; N%j == 0 ;) {
N /= j ;
cout << j ;
if ( N != 1 ) {
cout << " " ;
}
}
}
break ;
} else {
while ( N%d == 0 ) {
N /= d ;
for ( long int i = 2 ; d > 1 ; i++ ){
for ( long int j = i ; d%j == 0 ;) {
d /= j ;
cout << j ;
if ( d != 1 ) {
cout << " " ;
}
}
}
}
d += 1 ;
}
}
}
} | # 2018095, 2024-09-28 14:33:01, PPTPTTPTTTTTTTTTPP (33%)
#include <iostream>
#include <cmath>
using namespace std ;
int main () {
long int N = 0 ;
long int d = 2 ;
cin >> N ;
if ( N < 2 ) {
cout << "No prime factors for numbers less than 2." << endl ;
} else {
while ( N > 1 ) {
if ( (d*d) > N ) {
for ( long int i = 2 ; N > 1 ; i++ ){
for ( long int j = i ; N%j == 0 ;) {
N /= j ;
cout << j ;
if ( N != 1 ) {
cout << " " ;
}
}
}
break ;
} else {
while ( N%d == 0 ) {
N /= d ;
for ( long int i = 2 ; d > 1 ; i++ ){
for ( long int j = i ; d%j == 0 ;) {
d /= j ;
cout << j ;
if ( d != 1 ) {
cout << " " ;
}
}
}
}
d += 1 ;
}
}
return 0 ;
}
} | # 2018117, 2024-09-28 14:35:06, PPTPTTPTTTTTTTTTPP (33%)
#include <iostream>
#include <cmath>
using namespace std ;
int main () {
long int N = 0 ;
long int d = 2 ;
cin >> N ;
if ( N < 2 ) {
cout << "No prime factors for numbers less than 2." << endl ;
} else {
while ( N > 1 ) {
if ( (d*d) > N ) {
for ( long int i = 2 ; N > 1 ; i++ ){
for ( long int j = i ; N%j == 0 ;) {
N /= j ;
cout << j ;
if ( N != 1 ) {
cout << " " ;
}
}
}
} else {
while ( N%d == 0 ) {
N /= d ;
for ( long int i = 2 ; d > 1 ; i++ ){
for ( long int j = i ; d%j == 0 ;) {
d /= j ;
cout << j ;
if ( d != 1 ) {
cout << " " ;
}
}
}
}
d += 1 ;
}
}
return 0 ;
}
} | # 2018347, 2024-09-28 14:54:32, PPTPTTPTTTTTTTTTPP (33%)
#include <iostream>
#include <cmath>
using namespace std ;
int main () {
int N = 0 ;
int d = 2 ;
cin >> N ;
if ( N < 2 ) {
cout << "No prime factors for numbers less than 2." << endl ;
} else {
while ( N > 1 ) {
if ( (d*d) > N ) {
for ( int i = 2 ; N > 1 ; i++ ){
for ( int j = i ; N%j == 0 ;) {
N /= j ;
cout << j ;
if ( N != 1 ) {
cout << " " ;
}
}
}
break ;
} else {
while ( N%d == 0 ) {
N /= d ;
for ( int i = 2 ; d > 1 ; i++ ){
for ( int j = i ; d%j == 0 ;) {
d /= j ;
cout << j ;
if ( d != 1 ) {
cout << " " ;
}
}
}
}
d += 1 ;
}
}
return 0 ;
}
} |
# 2015725, 2024-09-28 10:34:55, PPP------PxT----PP (33%)
#include <bits/stdc++.h>
using namespace std ;
int main() {
long long n;
cin>>n;
int d=2;
bool stop=false ;
if (n<2) {
cout<<"No prime factors for numbers less than 2."<<endl ;
stop=true;
}
while(!stop) {
if(n>1) {
if(d*d>n) {
for (int i=2;i<=n;i++) {
int count=0;
if (n%i==0) {
for (int j=2;j<i-1;j++)
if (i%j==0) {
count++;
}
}
if(count==0) {
cout<<i<<" ";
}
}
stop=true ;
}
else if (n%d==0) {
while (n%d==0) {
n/=d ;
for (int i=2;i<=d;i++) {
int count=0;
if (d%i==0) {
for (int j=2;j<i-1;j++)
if (i%j==0) {
count++;
}
}
if(count==0) {
cout<<i<<" ";
}
}
}
}
else if (n%d!=0) {
d+=1;
}
}
if (n<=1) {
stop=true ;
}
}
} |
# 2015054, 2024-09-28 09:32:20, P---------------PP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
if(n>1){
if(d*d>n){
for(int i=0;i<n;i++){
cout << n << " ";
}
}
} else {
do{
if(n%d==0){
n/=d;
for(int i=0;i<n;i++){
cout << d << " ";
}
} else {
d+=1;
}
} while(n%d != 0);
}
}
} | # 2015518, 2024-09-28 10:14:23, P---------TTTTTTPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
if(n>1){
if(d*d>n){
cout << n << " ";
} else {
do{
if(n%d==0){
while(n%d==0){
n/=d;
cout << d << " ";
}
} else {
d+=1;
}
} while(n>1);
}
} cout << n;
}
} | # 2015703, 2024-09-28 10:33:08, P---------TTTTTTPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
if(n>1){
if(d*d>n){
cout << n << " ";
} else {
do{
if(n%d==0){
while(n%d==0){
n/=d;
cout << d << " ";
break;
}
} else {
d+=1;
}
} while(n>1);
}
} cout << n;
}
} | # 2015714, 2024-09-28 10:34:09, P--P--P---------PP (27%)
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
if(n>1){
if(d*d>n){
cout << n << " ";
} else {
do{
if(n%d==0){
while(n%d==0){
n/=d;
cout << d << " ";
}
} else {
d+=1;
break;
}
} while(n>1);
}
} cout << n;
}
} | # 2016601, 2024-09-28 11:52:06, PT-TT-T-T-TTTTTTPP (16%)
#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
do{
if(n>1){
if(d*d>n){
string ans = to_string(n) + " ";
cout << ans.substr(0,ans.length()-1);
} else {
if(n%d==0){
while(n%d==0){
n/=d;
string ans = to_string(d);
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
}
} else {
d+=1;
}
}
}
} while(n>1);
}
} | # 2016616, 2024-09-28 11:52:48, PT-TT-T-T-TTTTTTPP (16%)
#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
do{
if(n>1){
if(d*d>n){
string ans = to_string(n) + " ";
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
} else {
if(n%d==0){
while(n%d==0){
n/=d;
string ans = to_string(d);
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
}
} else {
d+=1;
}
}
}
} while(n>1);
}
} | # 2016650, 2024-09-28 11:54:20, PT--------------PP (16%)
#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
do{
if(n>1){
if(d*d>n){
string ans = to_string(n) + " ";
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
} else {
if(n%d==0){
while(n%d==0){
n/=d;
string ans = to_string(d);
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
}
} else {
d+=1;
break;
}
}
}
} while(n>1);
}
} | # 2016666, 2024-09-28 11:55:11, PT-TT-T-T-TTTTTTPP (16%)
#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
while(n>1){
if(n>1){
if(d*d>n){
string ans = to_string(n) + " ";
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
} else {
if(n%d==0){
while(n%d==0){
n/=d;
string ans = to_string(d);
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
}
} else {
d+=1;
}
}
}
}
}
} | # 2016742, 2024-09-28 11:58:10, PT-T--T---TTTTTTPP (16%)
#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
int n;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
while(n>1){
if(n>1){
if(d*d>n){
string ans = to_string(n) + " ";
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
} else {
if(n%d==0){
while(n%d==0){
n/=d;
string ans = to_string(d);
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
}
break;
} else {
d+=1;
}
}
}
}
}
} | # 2016777, 2024-09-28 11:59:07, PT-T--T---TTTTTTPP (16%)
#include<iostream>
#include<cmath>
#include<string>
using namespace std;
int main(){
int n=0;
cin >> n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less than 2.";
} else {
while(n>1){
if(n>1){
if(d*d>n){
string ans = to_string(n) + " ";
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
} else {
if(n%d==0){
while(n%d==0){
n/=d;
string ans = to_string(d);
cout << ans << " " << endl;
cout << ans.substr(0,ans.length()-1);
}
break;
} else {
d+=1;
}
}
}
}
}
} |
# 2017018, 2024-09-28 12:47:07, P---------------PP (16%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
for(int i=2;i<N;i++){
if(N%i==0){
cout << i << " ";
}
}
}else{
if(N%d==0){
N/=d;
for(int i=2;i<N;i++){
if(N%i==0){
cout << i << " ";
}
break;
}
}else{
d+=1;
}
}
}
}
} | # 2017093, 2024-09-28 12:54:58, Px--------------PP (16%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
for(int i=0;i<N;i++){
if(N%i!=0 && N%N==0){
cout << N;
}
}
}else{
if(N%d==0){
N/=d;
for(int i=2;i<N;i++){
if(N%i==0){
cout << i << " ";
}
break;
}
}else{
d+=1;
}
}
}
}
} | # 2017238, 2024-09-28 13:10:16, PP--------------PP (22%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
if(N>1){
if(d*d>N){
cout << N << " ";
}else{
if(N%d==0){
N/=d;
for(int i=2;i<N;){
if(N%i==0){
cout << i << " ";
if(N%i!=0) i++;
}
break;
}
}else{
d+=1;
}
}
}
}
} | # 2018374, 2024-09-28 14:56:33, PP-x--x----T----PP (22%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
do{
if(N>1){
if(d*d>N){
cout << N;
}else{
if(N%d==0){
N/=d;
cout << d;
}else{
d+=1;
}
}
}else{
break;
}
}while(N%d!=0);
}
} | # 2018464, 2024-09-28 15:02:40, P---P-----TT-TTTPP (22%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
for(int d=2;d<N;d++){
if(N>1){
if(d*d>N){
cout << N << " ";
}else{
if(N%d==0){
N/=d;
cout << d << " ";
}else{
d+=1;
}
}
}else{
break;
}
}
}
} | # 2018471, 2024-09-28 15:02:55, P---P-----TT-TTTPP (22%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
for(int d=2;d<N;d++){
if(N>1){
if(d*d>N){
cout << N << " ";
}else{
if(N%d==0){
N/=d;
cout << d << " ";
}else{
d+=1;
}
}
}else{
break;
}
}
}
} | # 2018532, 2024-09-28 15:07:45, P---P---P-xT----PP (27%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
for(int d=2;d<N;){
if(N>1){
if(d*d>N){
cout << N << " ";
}else{
if(N%d==0){
N/=d;
cout << d << " ";
}else{
d+=1;
}
}
//if(N%d!=0) d++;
}else{
break;
}
if(N%d!=0) d++;
}
}
} | # 2018562, 2024-09-28 15:09:51, P--TT-T-T-xT-xxxPP (16%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
for(int d=2;d<N;){
if(N>1){
if(d*d>N){
cout << N << " ";
}else{
if(N%d==0){
N/=d;
cout << d << " ";
}else{
d+=1;
}
}
}else{
break;
}
}
}
} | # 2018582, 2024-09-28 15:10:36, P---P---P-xT----PP (27%)
#include <iostream>
using namespace std;
int main(){
long long N;
cin >> N;
int d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}else{
for(int d=2;d<N;){
if(N>1){
if(d*d>N){
cout << N << " ";
}else{
if(N%d==0){
N/=d;
cout << d << " ";
}else{
d+=1;
}
}
//if(N%d!=0) d++;
}else{
break;
}
if(N%d!=0) d++;
}
}
} |
# 2015149, 2024-09-28 09:40:37, Compilation error (0%)
#include<iostream>
#include<cmath>
int main(){
int n,d=2;
std::cin >> n;
if ( n < 2)
{
std::cout >> "No prime factors for numbers less than 2." ;
}
for (int i = 2; i < n/2; i++)
{
if (d*d > n)
{ std::cout<< n;
break;}
if (n % d==0)
{
std::cout << d;
n = n/d;
}else{
d+=1;
}
if (n<=1){
break;
}
}
} | # 2015190, 2024-09-28 09:43:09, P--P--P---TTTTTTPP (27%)
#include<iostream>
#include<cmath>
int main(){
int n,d=2;
std::cin >> n;
if ( n < 2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
for (int i = 2; i < n/2; i++)
{
if (d*d > n)
{ std::cout << n;
break;}
if (n % d==0)
{
std::cout << d;
n = n/d;
}else{
d+=1;
}
if (n<=1){
break;
}
}
} | # 2015208, 2024-09-28 09:44:36, P--P--P---TTTTTTPP (27%)
#include<iostream>
#include<cmath>
int main(){
int n,d=2;
std::cin >> n;
if ( n < 2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
for (int i = 2; i < n/2; i++)
{
if (d*d > n)
{ std::cout << n;
break;}
if (n % d==0)
{
std::cout << d << " ";
n = n/d;
}else{
d+=1;
}
if (n<=1){
break;
}
}
} | # 2015332, 2024-09-28 09:56:08, P--P--P---TTTTTTPP (27%)
#include<iostream>
#include<cmath>
int main(){
int n,d=2;
std::cin >> n;
if ( n < 2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
for (int i = 2; i < n/2; i++)
{
if (d*d > n)
{ std::cout << n;
break;}
if (n % d==0)
{
std::cout << d << " ";
n = n/d;
}else{
d+=1;
}
if (d>n){
break;
}
}
} | # 2015349, 2024-09-28 09:57:42, Compilation error (0%)
#include<iostream>
#include<cmath>
int main(){
double n;
int d=2;
std::string num;
std::cin >> n;
if ( n < 2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
for (int i = 2; i < n/2; i++)
{
if (d*d > n)
{ std::cout << n ;
break;}
if (n % d==0)
{
std::cout << d << " ";
n = n/d;
}else{
d+=1;
}
if (d>n){
break;
}
}
} | # 2015474, 2024-09-28 10:10:07, P--P--P---TTTTTTPP (27%)
#include<iostream>
#include<cmath>
int main(){
int n;
int d=2;
std::string num;
std::cin >> n;
if ( n < 2)
{
std::cout << "No prime factors for numbers less than 2." ;
}
for (int i = 2; i < n/2; i++)
{
if (d*d > n)
{ std::cout << n ;
break;}
else if (n % d==0)
{
std::cout << d << " ";
n = n/d;
}else{
d+=1;
}
if (d>n){
break;
}
}
} |
# 2015029, 2024-09-28 09:30:08, ------------------ (0%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d;
d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2" << endl;
// }else{
// if(N>1){
// if(d*d>N){
// //
// }else if(N%d==0){
// N/=d;
// cout << "d" << endl;
// }else{
// d+=1;
// if(N>1){
// if(d*d>N){
// //
// }
// }
// }
// }
}
} | # 2015039, 2024-09-28 09:31:05, P---------------PP (16%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d;
d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2." << endl;
}
} | # 2015120, 2024-09-28 09:36:51, PP--------------PP (22%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d;
d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2." << endl;
}else{
if(N>1){
if(d*d>N){
cout << d << endl;
}
// else if(N%d==0){
// N/=d;
// cout << d << endl;
// }else{
// d+=1;
// if(N>1){
// if(d*d>N){
// //
// }
// }
// }
}
}
} | # 2015635, 2024-09-28 10:26:45, PP--------------PP (22%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d;
d = 2;
if(N<2){
cout << "No prime factors for numbers less than 2." << endl;
}else{
if(N>1){
if(d*d>N){
cout << d << endl;
}else if(N%d==0){
N/=d;
cout << d << endl;
}else{
d+=1;
if(N>1){
if(d*d>N){
cout << d << endl;
}else if(N%d == 0){
if(N/=d){
cout << d << endl;
}else{
d+=1;
if(N>1){
if(d*d>N){
cout << d << endl;
}
}
}
}
}
}
}
}
} |
# 2015462, 2024-09-28 10:09:00, PP--------T-----PP (22%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
int k = 0, a[1000];
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
if (n > 1){
if (d * d > n){
for (int i = 2; i <= n; ){
if (n % i == 0){
a[k++] = i;
n /= i;
} else {
i++;
}
for (int i = 0; i < k-1; i++) cout << a[i] << " ";
cout << a[k-1];
}
} else {
if (n % d == 0){
for (int d = 2; d <= n; ){
if (n % d == 0){
a[k++] = d;
n /= d;
} else {
d++;
}
for (int j = 0; j < k-1; j++) cout << a[j] << " ";
cout << a[k-1];
}
}
}
}
}
} | # 2016411, 2024-09-28 11:40:35, P---------T-----PP (16%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
int k = 0, a[1000];
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
if (n > 1){
if (d * d > n){
for (int i = 2; i <= n; ){
if (n % i == 0){
a[k++] = i;
n /= i;
} else {
i++;
}
for (int i = 0; i < k-1; i++) cout << a[i] << " ";
}
} else {
if (n % d == 0){
for (int d = 2; d <= n; ){
if (n % d == 0){
a[k++] = d;
n /= d;
} else {
d++;
}
for (int j = 0; j < k-1; j++) cout << a[j] << " ";
}
}
}
}
}
} | # 2016428, 2024-09-28 11:41:36, PP--------T-----PP (22%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
int k = 0, a[1000];
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
if (n > 1){
if (d * d > n){
for (int i = 2; i <= n; ){
if (n % i == 0){
a[k++] = i;
n /= i;
} else {
i++;
}
for (int i = 0; i < k-1; i++) cout << a[i] << " ";
cout << a[k-1];
}
} else {
if (n % d == 0){
for (int d = 2; d <= n; ){
if (n % d == 0){
a[k++] = d;
n /= d;
} else {
d++;
}
for (int j = 0; j < k-1; j++) cout << a[j] << " ";
cout << a[k-1];
}
}
}
}
}
} | # 2016438, 2024-09-28 11:42:03, PP-T--T---TT-T--PP (22%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin >> n;
int d = 2;
int k = 0, a[1000];
if (n < 2){
cout << "No prime factors for numbers less than 2.";
} else {
while (n > 1){
if (d * d > n){
for (int i = 2; i <= n; ){
if (n % i == 0){
a[k++] = i;
n /= i;
} else {
i++;
}
for (int i = 0; i < k-1; i++) cout << a[i] << " ";
cout << a[k-1];
}
} else {
while (n % d == 0){
for (int d = 2; d <= n; ){
if (n % d == 0){
a[k++] = d;
n /= d;
} else {
d++;
}
for (int j = 0; j < k-1; j++) cout << a[j] << " ";
cout << a[k-1];
}
}
}
}
}
} |
# 2014998, 2024-09-28 09:25:00, -P-P--P----P------ (22%)
#include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2";
}
else{
while (n > 1){
if(d * d > n){
cout << n;
break;
}
else{
if (n % d == 0){
n /= d;
while (n >= d){
if(n % d == 0){
n /= d;
cout << d << " ";
}
else{
d++;
}
}
return 0;
}
else{
d += 1;
continue;
}
}
}
return 0;
}
} | # 2015188, 2024-09-28 09:43:03, -P-P--P----P------ (22%)
#include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while (n > 1){
if(d * d > n){
cout << n;
break;
}
else{
if (n % d == 0){
n /= d;
while (n >= d){
if(n % d == 0){
n /= d;
cout << d << " ";
}
else{
d++;
}
}
return 0;
}
else{
d += 1;
continue;
}
}
}
return 0;
}
} | # 2016269, 2024-09-28 11:30:15, -T-P--P----T------ (11%)
#include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while (n > 1){
if(d * d > n){
if(n % 2 != 0){
cout << n;
break;
}
}
else{
if (n % d == 0){
n /= d;
while (n >= d){
if(n % d == 0){
n /= d;
cout << d << " ";
}
else{
d++;
}
}
return 0;
}
else{
d += 1;
continue;
}
}
}
return 0;
}
} | # 2016277, 2024-09-28 11:30:35, -P-P--P----P------ (22%)
#include <iostream>
using namespace std;
int main() {
long long int n;
cin >> n;
long long int d = 2;
if(n < 2){
cout << "No prime factors for number less than 2.";
}
else{
while (n > 1){
if(d * d > n){
cout << n;
break;
}
else{
if (n % d == 0){
n /= d;
while (n >= d){
if(n % d == 0){
n /= d;
cout << d << " ";
}
else{
d++;
}
}
return 0;
}
else{
d += 1;
continue;
}
}
}
return 0;
}
} |
# 2017047, 2024-09-28 12:49:31, PTTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
if(n>1)
{
while (true)
{
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
}
else
{
if(n%d == 0)
{
n/=d;
for (int i=2; i<n; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
}
}
}
} | # 2017062, 2024-09-28 12:51:00, PTTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
if(n>1)
{
while (true)
{
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
}
else
{
if(n%d == 0)
{
n/=d;
for (int i=2; i<n; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
}
while(false)
{
break;
}
}
}
} | # 2017070, 2024-09-28 12:52:01, PTTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
if(n>1)
{
while (true)
{
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
}
else
{
if(n%d == 0)
{
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
}
while(false)
{
break;
}
}
}
} | # 2017453, 2024-09-28 13:30:42, Compilation error (0%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
if(n>1)
{
while (true)
{
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
}
else
{
if(n%d == 0)
{
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
while(false)
{
break;
}
}
}
} | # 2017462, 2024-09-28 13:31:24, PTTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
if(n>1)
{
while (true)
{
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
}
else
{
if(n%d == 0)
{
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
while(false)
{
break;
}
}
}
}
} | # 2017833, 2024-09-28 14:09:46, PTTTTTTTTTTTTTTTPP (16%)
#include<iostream>
using namespace std;
int main()
{
long long n;
cin>>n;
long long d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
if(n>1)
{
while (true)
{
if(d*d>n)
{
for (long long i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
}
else
{
if(n%d == 0)
{
n/=d;
for (long long i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
while(false)
{
break;
}
}
}
}
} | # 2017873, 2024-09-28 14:12:09, PTTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
while (true)
{
if(n>1)
{
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
}
else
{
if(n%d == 0)
{
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
}
while(false)
{
break;
}
}
}
} | # 2017894, 2024-09-28 14:13:37, PTTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
while ((n>1))
{
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
}
else
{
if(n%d == 0)
{
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
}
}
} | # 2017909, 2024-09-28 14:14:44, PTTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else
{
while (n>1)
{
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
}
else
{
if(n%d == 0)
{
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
}
while (n<=1)
{
break;
}
}
} | # 2018255, 2024-09-28 14:47:16, P-TTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
while(n>1)
{
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
break;
}
while(true)
{
if((n%d==0)){
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
}
} | # 2018274, 2024-09-28 14:48:46, P-TTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
while(true)
{
if(n>1){
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
break;
}
while(true)
{
if((n%d==0)){
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
}
else{
break;
}
}
} | # 2018397, 2024-09-28 14:57:59, P-TTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else{
while(true)
{
if(n>1){
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
break;
}
while(true)
{
if((n%d==0)){
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
continue;
}
}
}
else{
break;
}
}
}
} | # 2018430, 2024-09-28 15:01:06, P-TTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else{
while(true)
{
if(n>1){
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
break;
}
while(true)
{
if((n%d==0)){
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
}
continue;
}
}
else{
break;
}
}
}
} | # 2018495, 2024-09-28 15:05:05, P-TTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else{
while(true)
{
if(n>1){
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
cout<<n%i<<" ";
}
}
break;
}
else{
while(true)
{
if((n%d==0)){
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
}
}
continue;
}
}
else{
break;
}
}
}
} | # 2018518, 2024-09-28 15:06:52, P-TTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else{
while(true)
{
if(n>1){
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i != 0)
{
cout<<n%i<<" ";
}
}
break;
}
else{
while(true)
{
if((n%d==0)){
n/=d;
for (int i=2; i<d; i++)
{
if(d%i != 0)
{
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
}
}
continue;
}
}
else{
break;
}
}
}
} | # 2018661, 2024-09-28 15:14:39, P-TTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else{
while(true)
{
if(n>1){
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
if((n%i)%i !=0)
cout<<n%i<<" ";
}
}
break;
}
else{
while(true)
{
if((n%d==0)){
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
if((d%i)%i !=0)
cout<<d%i<<" ";
}
}
continue;
}
else
{
d+=1;
}
}
continue;
}
}
else{
break;
}
}
}
} | # 2018701, 2024-09-28 15:16:06, P-TTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int d=2;
if(n<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else{
while(true)
{
if(n>1){
if(d*d>n)
{
for (int i=2; i<n; i++)
{
if(n%i == 0)
{
for (int j=2; j<n; j++)
{
if((n%i)%j !=0)
cout<<n%i<<" ";
}
}
}
break;
}
else{
while(true)
{
if((n%n==0)){
n/=d;
for (int i=2; i<d; i++)
{
if(d%i == 0)
{
for (int j=2; j<d; j++)
{
if((d%i)%j !=0)
cout<<d%i<<" ";
}
}
}
continue;
}
else
{
d+=1;
}
}
continue;
}
}
else{
break;
}
}
}
} |
# 2016944, 2024-09-28 12:38:32, -TTxTTxxTxxxxxxx-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
cout << N ;
}
else if(N%d==0){
N/=d ;
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} | # 2016949, 2024-09-28 12:38:51, -TTxTTxxTTxxxxxx-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
cout << N ;
}
else if(N%d==0){
N/=d ;
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} | # 2016953, 2024-09-28 12:39:01, -TTxTTxxTxxxxxxx-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
cout << N ;
}
else if(N%d==0){
N/=d ;
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} | # 2016978, 2024-09-28 12:42:20, -TTxTTTxTxxxxxxx-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
cout << N ;
}
else if(N%d==0){
N/=d ;
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} | # 2017178, 2024-09-28 13:05:28, -TTTTTTTTTTTTTTT-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long n ; long long i ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
for(long long i=0;i<n;i++){
cout << i << " " ;
}
}
else if(N%d==0){
N/=d ;
for(long long i=0;i<n;i++){
cout << d << " " ;
}
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} | # 2017207, 2024-09-28 13:08:21, -TTTTTTTTTTTTTTT-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long n ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
for(long long i=0;i<n;i++){
cout << i << " " ;
}
}
else if(N%d==0){
N/=d ;
for(long long i=0;i<n;i++){
cout<< d << " " ;
}
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} | # 2017209, 2024-09-28 13:08:29, -TTTTTTTTTTTTTTT-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long n ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
for(long long i=0;i<n;i++){
cout << i << " " ;
}
}
else if(N%d==0){
N/=d ;
for(long long i=0;i<n;i++){
cout<< d << " " ;
}
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} | # 2017214, 2024-09-28 13:08:45, -TTTTTTTTTTTTTTT-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long n ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
for(long long i=0;i<n;i++){
cout << i << " " ;
}
}
else if(N%d==0){
N/=d ;
for(long long i=0;i<n;i++){
cout<< d << " " ;
}
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} | # 2017216, 2024-09-28 13:09:02, -TTTTTTTTTTTTTTT-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long n ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
for(long long i=0;i<n;i++){
cout << i << " " ;
}
}
else if(N%d==0){
N/=d ;
for(long long i=0;i<n;i++){
cout<< d << " " ;
}
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} | # 2017222, 2024-09-28 13:09:28, -TTTTTTTTTTTTTTT-- (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long n ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
do{
if(d*d>N){
for(long long i=0;i<n;i++){
cout << i << " " ;
}
}
else if(N%d==0){
N/=d ;
for(long long i=0;i<n;i++){
cout<< d << " " ;
}
}
}while(d+=1) ;
}
else return 0 ;
} | # 2017231, 2024-09-28 13:09:58, Compilation error (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long n ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
if(d*d>N){
for(long long i=0;i<n;i++){
cout << i << " " ;
}
}
else if(N%d==0){
N/=d ;
for(long long i=0;i<n;i++){
cout<< d << " " ;
}
else(d+=1) ;
}
else return 0 ;
} | # 2017240, 2024-09-28 13:10:40, Compilation error (0%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long n ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2" ;
}
else if(N>1){
while((d+=1)){
if(d*d>N){
for(long long i=0;i<n;i++){
cout << i << " " ;
}
}
else if(N%d==0){
N/=d ;
for(long long i=0;i<n;i++){
cout<< d << " " ;
}
}
}
else return 0 ;
} | # 2017338, 2024-09-28 13:19:33, PTTTTTTTTTTTTTTTPP (16%)
#include<iostream>
using namespace std ;
int main(){
long long N ; cin >> N ;
long long n ;
long long d = 2 ;
if(N<2){
cout << "No prime factors for numbers less than 2." ;
}
else if(N>1){
do{
if(d*d>N){
for(long long i=0;i<n;i++){
cout << i << " " ;
}
}
else if(N%d==0){
N/=d ;
for(long long i=0;i<n;i++){
cout<< d << " " ;
}
cout << d ;
}
}while(d+=1) ;
}
else return 0 ;
} |
# 2017048, 2024-09-28 12:49:51, PT-TT-TT---TT-T-PP (16%)
//104_​exam67_​1_​P1: Flowchart Prime Factors star
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
long long int n , d;
d = 2;
cin >> n;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n > 1)
{
if(d * d > n)
{
for(long long int i = 2 ; i < n ; i++)
{
if(n % i == 0)
{
cout << i << " ";
i = 2;
n = n / i;
}
}
//cout << n PRIME
}
else
{
do
{
n /= d;
for(long long int j = 2 ; j < d ; j++)
{
if(d % j == 0)
{
cout << j << " ";
j = 2;
d = d / j;
}
}
//cout << d prime
}while(n % d == 0);
d += 1;
}
}
}
return 0;
} | # 2017054, 2024-09-28 12:50:28, PT-TT-TTT-TTT-TTPP (16%)
//104_​exam67_​1_​P1: Flowchart Prime Factors star
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
long long int n , d;
d = 2;
cin >> n;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n > 1)
{
if(d * d > n)
{
for(long long int i = 2 ; i < sqrt(n) ; i++)
{
if(n % i == 0)
{
cout << i << " ";
i = 2;
n = n / i;
}
}
//cout << n PRIME
}
else
{
do
{
n /= d;
for(long long int j = 2 ; j < sqrt(d) ; j++)
{
if(d % j == 0)
{
cout << j << " ";
j = 2;
d = d / j;
}
}
//cout << d prime
}while(n % d == 0);
d += 1;
}
}
}
return 0;
} | # 2017804, 2024-09-28 14:07:35, PT-TT-TTT-TTTTTTPP (16%)
//104_​exam67_​1_​P1: Flowchart Prime Factors star
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
int n;
int d;
d = 2;
cin >> n;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
do
{
if(d * d > n)
{
for(int i = 2 ; i < n ; i++)
{
if(n % i == 0)
{
cout << "i = " << i << " ";
n = n / i;
i = 2;
}
}
//cout << n PRIME
}
else
{
do
{
n /= d;
for(long long int j = 2 ; j < sqrt(d) ; j++)
{
if(d % j == 0)
{
cout << j << " ";
d = d / j;
j = 2;
}
}
//cout << d prime
}while(n % d == 0);
d += 1;
}
}while(n > 1);
}
return 0;
} | # 2017831, 2024-09-28 14:09:43, PT-TT-TT---TT-T-PP (16%)
//104_​exam67_​1_​P1: Flowchart Prime Factors star
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
long long int n , d;
d = 2;
cin >> n;
if(n < 2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n > 1)
{
if(d * d > n)
{
for(long long int i = 2 ; i < n ; i++)
{
if(n % i == 0)
{
cout << i << " ";
n = n / i;
i = 2;
}
}
//cout << n PRIME
}
else
{
do
{
n /= d;
for(long long int j = 2 ; j < d ; j++)
{
if(d % j == 0)
{
cout << j << " ";
d = d / j;
j = 2;
}
}
//cout << d prime
}while(n % d == 0);
d += 1;
}
}
}
return 0;
} | # 2018079, 2024-09-28 14:31:20, P-TTTTTTTTTTTTTTPP (16%)
//104_​exam67_​1_​P1: Flowchart Prime Factors star
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
long long int n;
bool n1 = true , nd = true , ci = true;
int d = 2;
cin >> n;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n1 = true)
{
if(n > 1)
{
if(d * d > n)
{
for(long i = 2 ; i < sqrt(n) ; i++)
{
if(n % i == 0)
{
for(long j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(n == 1)
{
n1 = false;
}
}
}
break;
}
else
{
while(nd = true)
{
if(n % d == 0)
{
n = n / d;
for(int i = 2 ; i < d ; i++)
{
if(d % i == 0)
{
for(int j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(d == 1)
{
nd = false;
}
}
}
}
else
{
d += 1;
nd = false;
}
}
}
}
}
}
return 0;
} | # 2018224, 2024-09-28 14:44:03, TTTTTTTTTTxxxxxx-x (0%)
#include<iostream>
#include<cmath>
#include<iomanip>
#include<math.h>
using namespace std;
int main()
{
int m;
double irr = 0 , l = -1 , u = 1 , sum = 0;
cin >> m;
int c[m + 1];
for(int i = 0 ; i < m + 1 ; i++)
{
cin >> c[i];
}
for(int i = 0 ; i < m + 1 ; i++)
{
sum = c[i];
while(abs(c[i] - pow(irr + 1 , i)) > pow(10 , -8) * max(sum ,pow(irr + 1 , i)))
{
if(pow(irr + 1 , i) > c[i])
{
u = irr;
irr = (l + u) / 2;
}
else if(pow(irr + 1 , i) < c[i])
{
l = irr;
irr = (l + u) / 2;
}
}
}
cout << setprecision(8) << irr << endl;
return 0;
} | # 2018392, 2024-09-28 14:57:35, P-TTTTTTTTTTTTTTPP (16%)
//104_​exam67_​1_​P1: Flowchart Prime Factors star
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
long long int n;
bool n1 = true , nd = true , ci = true;
int d = 2;
cin >> n;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n1 = true)
{
if(n > 1)
{
if(d * d > n)
{
for(long i = 2 ; i < sqrt(n) ; i++)
{
if(n % i == 0)
{
for(long j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(n == 1)
{
n1 = false;
}
}
}
break;
}
else
{
while(nd = true)
{
if(n % d == 0)
{
n = n / d;
for(int i = 2 ; i < d ; i++)
{
if(d % i == 0)
{
for(int j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(d == 1)
{
nd = false;
}
}
}
}
else
{
d += 1;
nd = false;
}
}
}
}
}
}
return 0;
} | # 2018435, 2024-09-28 15:01:22, P-TTTTTTTTTTTTTTPP (16%)
//104_​exam67_​1_​P1: Flowchart Prime Factors star
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n;
bool n1 = true , nd = true , ci = true;
int d = 2;
cin >> n;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
while(n1 = true)
{
if(n > 1)
{
if(d * d > n)
{
for(int i = 2 ; i < sqrt(n) ; i++)
{
if(n % i == 0)
{
for(int j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(n == 1)
{
n1 = false;
}
}
}
break;
}
else
{
while(nd = true)
{
if(n % d == 0)
{
n = n / d;
for(int i = 2 ; i < d ; i++)
{
if(d % i == 0)
{
for(int j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(d == 1)
{
nd = false;
}
}
}
}
else
{
d += 1;
nd = false;
}
}
}
}
}
}
return 0;
} | # 2018466, 2024-09-28 15:02:43, P---------------PP (16%)
//104_​exam67_​1_​P1: Flowchart Prime Factors star
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n;
bool n1 = true , nd = true , ci = true;
int d = 2;
cin >> n;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
}
else
{
if(n > 1)
{
if(d * d > n)
{
for(int i = 2 ; i < sqrt(n) ; i++)
{
if(n % i == 0)
{
for(int j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(n == 1)
{
n1 = false;
}
}
}
}
else
{
if(n % d == 0)
{
n = n / d;
for(int i = 2 ; i < d ; i++)
{
if(d % i == 0)
{
for(int j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(d == 1)
{
nd = false;
}
}
}
}
else
{
d += 1;
nd = false;
}
}
}
}
return 0;
} | # 2018489, 2024-09-28 15:04:37, Compilation error (0%)
//104_​exam67_​1_​P1: Flowchart Prime Factors star
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int n;
bool n1 = true , nd = true , ci = true;
int d = 2;
cin >> n;
if(n<2)
{
cout << "No prime factors for numbers less than 2.";
return 0;
}
else
{
while(n1 = true)
{
if(n > 1)
{
if(d * d > n)
{
for(int i = 2 ; i < sqrt(n) ; i++)
{
if(n % i == 0)
{
for( j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(n == 1)
{
n1 = false;
return 0;
}
}
}
break;
}
else
{
while(nd = true)
{
if(n % d == 0)
{
n = n / d;
for(int i = 2 ; i < d ; i++)
{
if(d % i == 0)
{
for(int j = 2 ; j < i ; j++)
{
if(i % j == 0)
{
ci == false;
}
}
if(ci == true)
{
cout << i << " ";
n = n / i;
i = 2;
}
if(d == 1)
{
nd = false;
return 0;
}
}
}
}
else
{
d += 1;
nd = false;
}
}
}
}
}
}
return 0;
} |
# 2016891, 2024-09-28 12:34:24, P---------------PP (16%)
#include<iostream>
using namespace std;
int main(){
int A;
cin >> A;
if(A<2){
cout << "No prime factors for numbers less than 2.";
}else {
cout << "npor";
}
return 0;
} | # 2017257, 2024-09-28 13:12:08, P---------------PP (16%)
#include<iostream>
using namespace std;
int main(){
int N;
int d =2;
cin >> N;
int result1 = N/2;
int result2 =0;
if (result1 <2){
cout << "No prime factors for numbers less than 2." << endl;
}else if (N>1){
int result2 = d*d;
}else if( result2 > N){
cout << result2 << endl;
}else
cout << "done";
return 0;
} | # 2017375, 2024-09-28 13:24:32, ------------------ (0%)
#include<iostream>
using namespace std;
int main(){
int A;
cin >> A;
if (A=1000){
cout << "2 2 2 5 5 5";
}else if (A=1000000007)
cout << "1000000007";
} | # 2017382, 2024-09-28 13:24:54, P---------------PP (16%)
#include<iostream>
using namespace std;
int main(){
int N;
int d =2;
cin >> N;
int result1 = N/2;
int result2 =0;
if (result1 <2){
cout << "No prime factors for numbers less than 2." << endl;
}else if (N>1){
int result2 = d*d;
}else if( result2 > N){
cout << result2 << endl;
}else
cout << "done";
return 0;
} | # 2017663, 2024-09-28 13:55:26, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int N;
int d =2;
cin >> N;
int result1 = N/2;
int result2 =0;
if (result1 <2){
cout << "No prime factors for numbers less than 2." << endl;
}else if (N>1){
int result2 = d*d;
}else if( result2 > N){
cout << result2 << endl;
}else
cout << "2 2 2 5 5 5"
return 0;
} | # 2017666, 2024-09-28 13:55:36, P---------------PP (16%)
#include<iostream>
using namespace std;
int main(){
int N;
int d =2;
cin >> N;
int result1 = N/2;
int result2 =0;
if (result1 <2){
cout << "No prime factors for numbers less than 2." << endl;
}else if (N>1){
int result2 = d*d;
}else if( result2 > N){
cout << result2 << endl;
}else
cout << "2 2 2 5 5 5";
return 0;
} | # 2017671, 2024-09-28 13:56:04, P---------------PP (16%)
#include<iostream>
using namespace std;
int main(){
int N;
int d =2;
cin >> N;
int result1 = N/2;
int result2 =0;
if (result1 <2){
cout << "No prime factors for numbers less than 2." << endl;
}else if (N>1){
int result2 = d*d;
}else if( result2 > N){
cout << result2 << endl;
}else
cout << "2 2 2 5 5";
return 0;
} |
# 2016820, 2024-09-28 12:25:09, ------------------ (0%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
int d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for numbers less than 2";
}
} | # 2016821, 2024-09-28 12:25:41, P---------------PP (16%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
int d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
}
} | # 2016889, 2024-09-28 12:34:16, PxTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
int d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(n > 1){
if(d*d > n){
for(int i = 0; i < sqrt(n); i++){
if(n % i == 0){
for(int j = 3; j < sqrt(i); j+=2)
if((i % 2 != 0) && i % j != 0){
cout << i << ' ';
}
}
}
}
}
}
} | # 2016916, 2024-09-28 12:36:17, PxTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
int d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(n > 1){
if(d*d > n){
for(int i = 0; i < sqrt(n); i++){
if(n % i == 0){
if(i == 2){
cout << i << ' ';
}
for(int j = 3; j < sqrt(i); j+=2)
if((i % 2 != 0) && i % j != 0){
cout << i << ' ';
}
}
}
}
}
}
} | # 2016938, 2024-09-28 12:37:58, PxTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
int d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(n > 1){
if(d*d > n){
for(int i = 0; i < sqrt(n); i++){
if(n % i == 0){
if(i == 2){
cout << i << ' ';
}
for(int j = 3; j < sqrt(i); j+=2)
if((i % 2 != 0) && i % j != 0){
cout << i << ' ';
}
return 0;
}
}
}
}
}
} | # 2018460, 2024-09-28 15:02:29, PxTTTTTTTTTTTTTTPP (16%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
int d = 2;
cin >> n;
if (n < 2){
cout << "No prime factors for numbers less than 2.";
return 0;
}
else{
while(n > 1){
if(d*d > n){
for(int i = 0; i < sqrt(n); i++){
if(n % i == 0){
if(i == 2){
cout << i << ' ';
}
for(int j = 3; j < sqrt(i); j+=2)
if((i % 2 != 0) && i % j != 0){
cout << i << ' ';
}
return 0;
}
}
}
}
}
} |
# 2017042, 2024-09-28 12:49:13, -----------T-T-T-- (0%)
#include <iostream>
using namespace std;
int main(){
long long N;
int d = 2;
string ans ="";
cin >> N;
if(N < 2){
cout << "No prime number is less than 2\n";
}
while(N >1){
if(d*d >N){
for(int h = 2; h <= 3; h++){
if( N%h == 0){
N/=h;
ans += h;
ans+= " ";
}
}
for(int j = 5; j*j < N; j+=6){
if( N%j == 0 || N%(j+2) == 0){
N/=j;
ans += j;
ans+= " ";
}
}
break;
}else{
while(N%d == 0){
N/= d;
for(int h = 2; h <= 3; h++){
if( N%h == 0){
N/=h;
ans += h;
ans+= " ";
}
}
for(int j = 5; j*j < N; j+=6){
if( N%j == 0 || N%(j+2) == 0){
N/=j;
ans += j;
ans+= " ";
}
}
}
d+=1;
}
}
cout << ans;
return 0;
} | # 2017115, 2024-09-28 12:57:26, -----------T-TT--- (0%)
#include <iostream>
using namespace std;
int main(){
long long N;
int d = 2;
string ans ="";
cin >> N;
if(N < 2){
cout << "No prime number is less than 2\n";
}
while(N >1){
if(d*d >N){
for(int h = 2; h*h < N;){
if( N%h == 0){
N/=h;
ans += h;
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int h = 3; h*h < N;){
if( N%h == 0){
N/=h;
ans += h;
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int j = 5; j*j < N; j+=6){
if( N%j == 0 || N%(j+2) == 0){
N/=j;
ans += j;
ans+= " ";
}
}
break;
}else{
while(N%d == 0){
N/= d;
for(int h = 2; h*h < N;){
if( N%h == 0){
N/=h;
ans += h;
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int h = 3; h*h < N;){
if( N%h == 0){
N/=h;
ans += h;
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int j = 5; j*j < N; j+=6){
if( N%j == 0 || N%(j+2) == 0){
N/=j;
ans += j;
ans+= " ";
}
}
}
d+=1;
}
}
cout << ans;
return 0;
} | # 2018324, 2024-09-28 14:53:20, P---TT-TTTTTTTTTPP (16%)
#include <iostream>
using namespace std;
int main(){
long long N;
int d = 2;
string ans =" ";
cin >> N;
if(N<2){
cout << "No prime factors for numbers less than 2.\n";
}
while(N >1){
if(d*d >N){
for(int h = 2; h*h < N;){
if( N%h == 0){
N/=h;
ans += to_string(h);
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int h = 3; h*h < N;){
if( N%h == 0){
N/=h;
ans += to_string(h);
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int j = 5; j*j < N; j+=6){
if( N%j == 0 || N%(j+2) == 0){
N/=j;
ans += to_string(j);
ans+= " ";
}
}
break;
}else{
while(N%d == 0){
N/= d;
for(int h = 2; h*h < N;){
if( d%h == 0){
d/=h;
cout << h << " ";
}if(d%h != 0 ){
break;
}
}
for(int h = 3; h*h < N;){
if( d%h == 0){
d/=h;
cout << h << " ";
}if(d%h != 0 ){
break;
}
}
for(int j = 5; j*j < N; j+=6){
if( d%j == 0 || d%(j+2) == 0){
N/=j;
cout << j << " ";
}
}
}
d+=1;
}
}
/*cout << ans << N;*/
return 0;
} | # 2018368, 2024-09-28 14:56:23, Compilation error (0%)
a#include <iostream>
using namespace std;
int main(){
long long N;
int d = 2;
string ans =" ";
cin >> N;
if(N<2){
cout << "No prime factors for numbers less than 2.\n";
}else{
while(N >1){
if(d*d >N){
for(int h = 2; h*h < N;){
if( N%h == 0){
N/=h;
ans += to_string(h);
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int h = 3; h*h < N;){
if( N%h == 0){
N/=h;
ans += to_string(h);
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int j = 5; j*j < N; j+=6){
if( N%j == 0 || N%(j+2) == 0){
N/=j;
ans += to_string(j);
ans+= " ";
}
}
break;
}else{
while(N%d == 0){
N/= d;
for(int h = 2; h*h < N;){
if( d%h == 0){
d/=h;
cout << h << " ";
}if(d%h != 0 ){
break;
}
}
for(int h = 3; h*h < N;){
if( d%h == 0){
d/=h;
cout << h << " ";
}if(d%h != 0 ){
break;
}
}
for(int j = 5; j*j < N; j+=6){
if( d%j == 0 || d%(j+2) == 0){
N/=j;
cout << j << " ";
}
}
}
d+=1;
}
}
cout << ans << N;
}
return 0;
} | # 2018379, 2024-09-28 14:56:54, P---TT-TTTTTTTTTPP (16%)
#include <iostream>
using namespace std;
int main(){
long long N;
int d = 2;
string ans =" ";
cin >> N;
if(N<2){
cout << "No prime factors for numbers less than 2.\n";
}else{
while(N >1){
if(d*d >N){
for(int h = 2; h*h < N;){
if( N%h == 0){
N/=h;
ans += to_string(h);
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int h = 3; h*h < N;){
if( N%h == 0){
N/=h;
ans += to_string(h);
ans+= " ";
}if(N%h != 0 ){
break;
}
}
for(int j = 5; j*j < N; j+=6){
if( N%j == 0 || N%(j+2) == 0){
N/=j;
ans += to_string(j);
ans+= " ";
}
}
break;
}else{
while(N%d == 0){
N/= d;
for(int h = 2; h*h < N;){
if( d%h == 0){
d/=h;
cout << h << " ";
}if(d%h != 0 ){
break;
}
}
for(int h = 3; h*h < N;){
if( d%h == 0){
d/=h;
cout << h << " ";
}if(d%h != 0 ){
break;
}
}
for(int j = 5; j*j < N; j+=6){
if( d%j == 0 || d%(j+2) == 0){
N/=j;
cout << j << " ";
}
}
}
d+=1;
}
}
cout << ans << N;
}
return 0;
} |
# 2017398, 2024-09-28 13:26:03, P---------------PP (16%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (true) {
if (N > 1) {
if (d*d > N) {
int i = 2;
bool prime = true;
if (i <= 1) {
prime = false;
}
else {
for (long long j = 2; j*j <= i; j++) {
prime =false;
break;
}
}
if (i == prime) {
while (N != 1) {
while (N%i == 0) {
cout << i << ' ';
N = N/i;
}
i++;
}
}
}
else if (N%d == 0) {
N /= d;
int i = 2;
bool prime = true;
if (i <= 1) {
prime = false;
}
else {
for (long long j = 2; j*j <= i; j++) {
prime =false;
break;
}
}
if (i == prime) {
while (d != 1) {
while (d%i == 0) {
cout << i << ' ';
d = d/i;
}
i++;
}
}
}
else {
d += 1;
}
}
}
}
} | # 2018345, 2024-09-28 14:54:25, Compilation error (0%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (true) {
if (N > 1) {
if (d*d > N) {
while (N != 1) {
while (N%i == 0) {
cout << i << ' ';
N = N/i;
}
i++;
}
// int i = 2;
// bool prime = true;
// if (i <= 1) {
// prime = false;
// }
// else {
// for (long long j = 2; j*j <= i; j++) {
// prime =false;
// break;
// }
// }
// if (i == prime) {
// while (N != 1) {
// while (N%i == 0) {
// cout << i << ' ';
// N = N/i;
// }
// i++;
// }
// }
}
else if (N%d == 0) {
N /= d;
while (d != 1) {
while (d%i == 0) {
cout << i << ' ';
d = d/i;
}
i++;
}
// int i = 2;
// bool prime = true;
// if (i <= 1) {
// prime = false;
// }
// else {
// for (long long j = 2; j*j <= i; j++) {
// prime =false;
// break;
// }
// }
// if (i == prime) {
// while (d != 1) {
// while (d%i == 0) {
// cout << i << ' ';
// d = d/i;
// }
// i++;
// }
// }
}
else {
d += 1;
}
}
}
}
} | # 2018355, 2024-09-28 14:54:54, P---------------PP (16%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (true) {
if (N > 1) {
if (d*d > N) {
int i = 2;
bool prime = true;
if (i <= 1) {
prime = false;
}
else {
for (long long j = 2; j*j <= i; j++) {
prime =false;
break;
}
}
if (i == prime) {
while (N != 1) {
while (N%i == 0) {
cout << i << ' ';
N = N/i;
}
i++;
}
}
}
else if (N%d == 0) {
N /= d;
int i = 2;
bool prime = true;
if (i <= 1) {
prime = false;
}
else {
for (long long j = 2; j*j <= i; j++) {
prime =false;
break;
}
}
if (i == prime) {
while (d != 1) {
while (d%i == 0) {
cout << i << ' ';
d = d/i;
}
i++;
}
}
}
else {
d += 1;
}
}
}
}
} | # 2018373, 2024-09-28 14:56:33, PTTTTTTTTTTTTTTTPP (16%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (true) {
if (N > 1) {
if (d*d > N) {
int i = 2;
bool prime = true;
if (i <= 1) {
prime = false;
}
else {
for (long long j = 2; j*j <= i; j++) {
prime =false;
break;
}
}
if (i == prime) {
while (N != 1) {
while (N%i == 0) {
cout << i << ' ';
N = N/i;
}
i++;
}
}
}
else if (N%d == 0) {
N /= d;
int i = 2;
bool prime = true;
if (i <= 1) {
prime = false;
}
else {
for (long long j = 2; j*j <= i; j++) {
prime =false;
break;
}
}
if (i == prime) {
while (d != 1) {
while (d%i == 0) {
cout << i << ' ';
d = d/i;
}
i++;
}
}
}
else {
d += 1;
}
}
}
}
} | # 2018405, 2024-09-28 14:58:49, PTTTTTTTTTTTTTTTPP (16%)
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
int d = 2;
if (N < 2) {
cout << "No prime factors for numbers less than 2.";
}
else {
while (true) {
if (N > 1) {
if (d*d > N) {
int i = 2;
bool prime = true;
if (i <= 1) {
prime = false;
}
else {
for (long long j = 2; j*j <= i; j++) {
prime =false;
break;
}
}
if (i == prime) {
while (N != 1) {
while (N%i == 0) {
cout << i << ' ';
N = N/i;
}
i++;
}
break;
}
}
else if (N%d == 0) {
N /= d;
int i = 2;
bool prime = true;
if (i <= 1) {
prime = false;
}
else {
for (long long j = 2; j*j <= i; j++) {
prime =false;
break;
}
}
if (i == prime) {
while (d != 1) {
while (d%i == 0) {
cout << i << ' ';
d = d/i;
}
i++;
}
break;
}
}
else {
d += 1;
}
}
}
}
} |
# 2015607, 2024-09-28 10:22:59, ------------------ (0%)
#include <bits/stdc++.h>
using namespace std;
bool prime(){
int n;
if(n==1)return false;
for(long long i = 2;i<ceil(sqrt(n));i++){
if(n%i==0){
return false;
}
}
return true;
}
int main(){
int n;
int d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2";
}
else{
if(n>1){
if(d*d>n){
for(int i=0;i<n;i++){
int k=2;
if(n%k!=0){
k++;
if(n%k==0){
cout << k;
}
}
}
}
}
}
} | # 2015608, 2024-09-28 10:23:13, ------------------ (0%)
#include <bits/stdc++.h>
using namespace std;
bool prime(){
int n;
if(n==1)return false;
for(long long i = 2;i<ceil(sqrt(n));i++){
if(n%i==0){
return false;
}
}
return true;
}
int main(){
int n;
int d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2";
}
} | # 2015609, 2024-09-28 10:23:26, P---------------PP (16%)
#include <bits/stdc++.h>
using namespace std;
bool prime(){
int n;
if(n==1)return false;
for(long long i = 2;i<ceil(sqrt(n));i++){
if(n%i==0){
return false;
}
}
return true;
}
int main(){
int n;
int d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
} | # 2016276, 2024-09-28 11:30:34, P---------TTTTTTPP (16%)
#include <bits/stdc++.h>
using namespace std;
bool prime(){
int n;
if(n==1)return false;
for(long long i = 2;i<ceil(sqrt(n));i++){
if(n%i==0){
return false;
}
}
return true;
}
int main(){
int n;
int d=2;
cin >> n;
if(n<2){
cout << "No prime factors for numbers less than 2.";
}
else{
if(n>1){
loop_1:
if(d*d>n){
for(int i=0;i<n;i++){
int k=2;
if(n%k!=0){
k++;
if(n%k==0){
cout << k;
}
}
}
}
else{
if(n%d==0){
n /= d;
for(int i=0;i<n;i++){
int k=2;
if(n%k!=0){
k++;
if(n%k==0){
cout << k;
}
}
}
}
else{
d += 1;
goto loop_1;
}
}
}
}
} |
# 2016875, 2024-09-28 12:33:14, P---------TTTTTTPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int n;
int main(){
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
in1:
if(n > 1){
if(d * d > n){
int y;
y = (n / n == 1 && n % 2 != 0);
y++;
cout << y << " ";
}
else{
if(n % d == 0){
n /= d;
cout << d << " ";
return 0;
}
else{
d += 1;
goto in1;
}
}
}
}
} | # 2017722, 2024-09-28 14:01:53, P---------TTTTTTPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int n;
int main(){
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
in1:
if(n > 1){
if(d * d > n){
int y;
y = (n / n == 1 && n % 2 != 0);
y++;
cout << y << " ";
}
else{
if(n % d == 0){
n /= d;
cout << n << " ";
return 0;
}
else{
d += 1;
goto in1;
}
}
}
}
} | # 2017751, 2024-09-28 14:03:59, P---------TTTTTTPP (16%)
#include<iostream>
#include<cmath>
using namespace std;
int n;
int main(){
cin >> n;
int d = 2;
if(n < 2){
cout << "No prime factors for numbers less than 2.";
}
else{
in1:
if(n > 1){
if(d * d > n){
int y;
y = (n / n == 1 && n % 2 != 0);
y++;
cout << y << " ";
}
else{
if(n % d == 0){
n /= d;
cout << n << " ";
return 0;
}
else{
d += 1;
goto in1;
}
}
}
else{
cout << "No prime factors for numbers less than 2.";
}
}
} |
# 2015170, 2024-09-28 09:41:54, P---------------PP (16%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n,d=2;
cin>>n;
if(n<2) cout<<"No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d>n){
// n
break;
}
else{
if(n%d ==0){
n/=d;
//// ''vbfvd
break;
}
else{
d+=1;
}
}
}
}
return 0;
} | # 2016169, 2024-09-28 11:19:59, P----------T----PP (16%)
#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n,d=2;
cin>>n;
if(n<2) cout<<"No prime factors for numbers less than 2.";
else{
while(n>1){
if(d*d>n){
// n
int j=2;
for(int i=0;i<n;i++){
if(n%j==0){
cout<<j<<" ";
}
else{
for(int w=2;w<j;w++){
if(j%w!=0){
break;
}
else {j++; w=2;}
}
}
}
break;
}
else{
if(n%d ==0){
n/=d;
//// ''vbfvd
int j=2;
for(int i=0;i<d;i++){
if(d%j==0){
cout<<j<<" ";
}
else{
for(int w=2;w<j;w++){
if(j%w!=0){
break;
}
else {
j++;
w=2;
}
}
}
}
//////////
//break;
}
else{
d+=1;
}
}
}
}
return 0;
} |
# 2015251, 2024-09-28 09:49:23, P---------TTTTTTPP (16%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
while (N > 1){
if(d * d > N){
N /= d;
cout << d + ' ';
}
else if(N % d == 0){
N /= d;
cout << N + ' ';
}
else {d+=1;}
}
} | # 2015254, 2024-09-28 09:49:32, P---------TTTTTTPP (16%)
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for numbers less than 2.";
}
while (N > 1){
if(d * d > N){
N /= d;
cout << d + ' ';
}
else if(N % d == 0){
N /= d;
cout << N + ' ';
}
else {d+=1;}
}
} |
# 2015436, 2024-09-28 10:05:32, PT-TT-T-T-TTTTTTPP (16%)
#include<iostream>
using namespace std;
int main() {
int n; cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else {
while (n>1){
if(d *d>n){
int y=2;//check n
string s;
while(n>=y){
int x=2;//check y
for(;y>x;x++){
if(y%x ==0) break;
}
if(x==y) {
if(n%y == 0) cout<<y<<" ";
//s+= to_string(y);
}
y++;
}
if(n%y == 0)cout<<y<<" ";
}
else{
while(n%d == 0) {
n/=d;
int y1=2;//check n
while(n>=y1){
int x1=2;//check y
for(;y1>x1;x1++){
if(y1%x1 ==0) break;
}
if(x1==y1) {
if(n%y1 == 0)cout<<y1<<" ";
}
y1++;
}
}
d+=1;
}
}
}
} | # 2015712, 2024-09-28 10:33:52, PT-TT-T-T-TTTTTTPP (16%)
#include<iostream>
using namespace std;
int main() {
int n; cin>>n;
int d=2;
if(n<2){
cout<<"No prime factors for numbers less than 2.";
}
else {
while (n>1){
if(d *d>n){
int y=2;//check n
string s;
while(n>=y){
int x=2;//check y
for(;y>x;x++){
if(y%x ==0) break;
}
if(x==y) {
if(n%y == 0) cout<<y<<" ";
//s+= to_string(y);
}
y++;
}
if(n%y == 0)cout<<y<<" ";
}
else{
while(n%d == 0) {
n/=d;
int y1=2;//check n
while(n>=y1){
int x1=2;//check y
for(;y1>x1;x1++){
if(y1%x1 ==0) break;
}
if(x1==y1) {
if(n%y1 == 0)cout<<y1<<" ";
}
y1++;
}
}
d+=1;
}
}
}
} |
# 2014987, 2024-09-28 09:23:18, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
count d=2;
if(a<2)
{
cout<<"No prime factors for numbers less than 2";
}
else if(a>1){
if(d*d>a){
cout<<a<<" ";
d+=1;
}
else if(a<1||a==1){
break;
}
}
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=d<<" ";
else{
a<2;
continue;
}
}
}
return 0 ;
} | # 2015024, 2024-09-28 09:29:21, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
count d=2;
if(a<2)
{
cout<<"No prime factors for numbers less than 2";
}
else if(a>1){
if(d*d>a){
cout<<a<<" ";
d+=1;
}
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=0<<" ";
}
else{
d+=1;
}
}
}
return 0 ;
} | # 2015074, 2024-09-28 09:33:30, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
count d=2;
if(a<2)
{
cout<<"No prime factors for numbers less than 2";
}
else if(a>1){
if(d*d>a){
cout<<a<<" ";
d+=1;
}
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=0<<" ";
}
else{
d+=1;
}
}
}
return 0 ;
} | # 2015142, 2024-09-28 09:40:04, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
count d=2;
if(a<2)
{
cout<<"No prime factors for numbers less than 2";
}
if(a>1){
else if(d*d>a){
cout<<a<<" ";
d+=1;
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=0<<" ";
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=0<<" ";
else{
d+=1;
}
}
}
}
}
}
return 0 ;
} | # 2015171, 2024-09-28 09:42:01, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
count d=2;
if(a<2)
{
cout<<"No prime factors for numbers less than 2.";
}
else if(a>1){
else if(d*d>a){
cout<<a<<" ";
d+=1;
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=0<<" ";
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=0<<" ";
else{
d+=1;
}
}
}
}
}
}
return 0 ;
} | # 2015245, 2024-09-28 09:48:41, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
count d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
}
else if(a>1){
if(d*d>a){
cout<<a<<" ";
a++;
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=0<<" ";
}
else{
d+=1;
}
}
}
}
}
return 0 ;
} | # 2015338, 2024-09-28 09:56:44, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
count d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
}
else if(a>1){
if(d*d>a){
cout<<a<<" ";
a++;
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=0<<" ";
}
else{
d+=1;#include<bits/stdc++h>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(a>1){
if(d*d>a){
cout<<a<<" ";
a++;
else if(d*d<a||d*d==a){
if(a%d==){
cout<<a/=0<<" ";
}
else if(a%d!=0){
n<2;
continue;
}
}
}
}
}
return 0 ;
}
}
}
}
}
}
return 0 ;
} | # 2015610, 2024-09-28 10:23:37, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(a>2||a==2){
if(a>1){
else if(d*d>a){
cout<<a<<" ";
}
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=d<<" ";
}
else if(a%d!=0){
continue;
}
}
}
}
}
return 0 ;
} | # 2015615, 2024-09-28 10:24:18, Compilation error (0%)
#include<bits/stdc++h>
#include<cmath>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(a>2||a==2){
if(a>1){
else if(d*d>a){
cout<<a<<" ";
}
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=d<<" ";
}
else if(a%d!=0){
continue;
}
}
}
}
}
return 0 ;
} | # 2015622, 2024-09-28 10:25:25, Compilation error (0%)
#include<bits/stdc++h>
#include<cmath>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
}
else if(a>2||a==2){
if(a>1){
else if(d*d>a){
cout<<a<<" ";
}
else if(d*d<a||d*d==a){
if(a%d==0){
cout<<a/=d<<" ";
}
else if(a%d!=0){
continue;
}
}
}
}
}
return 0 ;
} | # 2016052, 2024-09-28 11:08:13, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(n>1){
else if(d*d>a){
cout<<a<<" ";
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016055, 2024-09-28 11:08:43, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
if(n>1){
else if(d*d>a){
cout<<a<<" ";
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016057, 2024-09-28 11:08:58, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
}
if(n>1){
else if(d*d>a){
cout<<a<<" ";
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016059, 2024-09-28 11:09:17, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
}
else if(n>1){
else if(d*d>a){
cout<<a<<" ";
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016066, 2024-09-28 11:09:57, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(a>1){
else if(d*d>a){
cout<<a<<" ";
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016081, 2024-09-28 11:11:16, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
int d=2;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(a>1){
else if(d*d>a){
cout<<a<<" ";
a++;
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
a++;
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016091, 2024-09-28 11:12:37, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
int d=2;
count=1;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(a>1){
else if(d*d>a){
cout<<a<<" ";
count++;
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
count++;
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016109, 2024-09-28 11:14:02, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
int d=2;
count=1;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(a>1){
else if(d*d>a){
cout<<a<<" ";
count++;
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
count++;
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016137, 2024-09-28 11:16:47, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
int d=2;
count=1;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
if(a>1){
if(d*d>a){
cout<<a<<" ";
count++;
}
else if(d*d<a||d*d==a){
if (a%d==0){
cout<<a/=d<<" ";
count++;
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016182, 2024-09-28 11:21:50, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
int d=2;
count=1;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(a>2||a==2){
else if(a>1){
else if (d*d>a){
cout<<a<<" ";
count++;
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
count++;
}
}
else if(a%d!=0){
continue;
}
}
}
}
return 0 ;
} | # 2016307, 2024-09-28 11:33:01, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
int d=2;
count=1;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
else if(a>2||a==2){
else if(a>1){
else if (d*d>a){
cout<<a<<" ";
count++;
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
count++;
}
}
else if(a%d!=0){
d+=1;
continue;
}
}
}
}
return 0 ;
} | # 2016355, 2024-09-28 11:36:18, Compilation error (0%)
#include<bits/stdc++h>
using namespace std;
int(){
long long a;
cin>>a;
int d=2;
count=1;
while(true)
{
if(a<2){
cout<<"No prime factors for numbers less than 2";
break;
}
if(a>2||a==2){
else if(a>1){
else if (d*d>a){
cout<<a<<" ";
count++;
}
else if(d*d<a||d*d==a){
else if (a%d==0){
cout<<a/=d<<" ";
count++;
}
}
else if(a%d!=0){
d+=1;
continue;
}
}
}
}
return 0 ;
} |
# 2015000, 2024-09-28 09:25:13, Compilation error (0%)
#include<iostrem
using namespace std;
int main(){
int n;
int d=2;
if(n<2){
cout << "No prime factors for numbers less";
break;
}
else{
while(true){
if(n<1){
if((d*d)<n){
cout << "" << " ";
}
else{
if(n%d==0){
n/=d;
cout << ;
}
else{
d+=1;
}
}
}
}
}
} | # 2015237, 2024-09-28 09:47:53, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
string n;
cin << n;
if(n.length()<=19){
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if(d*d>n){
cout << "";
}
else{
while(true){
if(n%d==0){
n/=d;
cout << " ";
}
else{
d+=1;
}
}
}
}
else{
break;
}
}
}
}
} | # 2015303, 2024-09-28 09:53:04, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
string n;
cin << n;
if(n.length()<=19){
int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if(d*d>n){
cout << d << " ";
}
else{
while(true){
if(n%d==0){
n/=d;
cout << n <<" ";
}
else{
d+=1;
}
}
}
}
else{
break;
}
}
}
} | # 2015309, 2024-09-28 09:53:33, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
string n;
cin << n;
//if(n.length()<=19){
//int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if(d*d>n){
cout << d << " ";
}
else{
while(true){
if(n%d==0){
n/=d;
cout << n <<" ";
}
else{
d+=1;
}
}
}
}
else{
break;
}
}
//}
} | # 2015314, 2024-09-28 09:53:52, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
int n;
//string n;
cin << n;
//if(n.length()<=19){
//int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if(d*d>n){
cout << d << " ";
}
else{
while(true){
if(n%d==0){
n/=d;
cout << n <<" ";
}
else{
d+=1;
}
}
}
}
else{
break;
}
}
//}
} | # 2015340, 2024-09-28 09:56:54, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
int n;
//string n;
cin << n;
//if(n.length()<=19){
//int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d==0){
n/=d;
cout << d <<" ";
}
else{
d+=1;
}
}
}
}
else{
break;
}
}
//}
} | # 2015556, 2024-09-28 10:17:39, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
int n;
//string n;
cin << n;
//if(n.length()<=19){
//int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d==0){
n/=d;
cout << d <<" ";
}
else{
d+=1;
}
}
}
}
else{
break;
}
}
//}
} | # 2015611, 2024-09-28 10:23:46, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
int n;
//string n;
cin << n;
//if(n.length()<=19){
//int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d==0){
n/=d;
cout << d <<" ";
}
else{
d+=1;
continue;
}
}
}
}
else{
break;
}
}
//}
} | # 2015654, 2024-09-28 10:28:39, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
int n;
//string n;
cin << n;
//if(n.length()<=19){
//int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d+=1;
}
}
else{
break;
}
}
//}
} | # 2015662, 2024-09-28 10:29:22, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
int n;
//string n;
cin << n;
if(n.length()<=19){
int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2015667, 2024-09-28 10:30:05, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
int n;
//string n;
cin << n;
if(n.length()<=19){
int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2015670, 2024-09-28 10:30:18, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string n;
cin << n;
if(n.length()<=19){
int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2015707, 2024-09-28 10:33:20, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string a;
cin >> a;
if(n.length()<=19){
int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2015713, 2024-09-28 10:33:55, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string a;
cin >> a;
if(a.length()<=19){
int n=stoi(n);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2015723, 2024-09-28 10:34:47, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string a;
cin >> a;
if(a.length()<=19){
int n=stoi(a);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(n%d==0){
n/=d;
cout << d <<" ";
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2015743, 2024-09-28 10:37:58, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string a;
cin >> a;
if(a.length()<=19){
int n=stoi(a);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d==0){
n/=d;
cout << d <<" ";
}
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2016165, 2024-09-28 11:19:36, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string a;
cin >> a;
if(a.length()<=19){
int n=stoi(a);
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d==0){
n/=d;
cout << d <<" ";
}
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2016189, 2024-09-28 11:22:19, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string a;
if(a.length()<=19){
int n=stoi(a);
cin >> n
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d==0){
n/=d;
cout << d <<" ";
}
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2016227, 2024-09-28 11:25:20, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string a;
cin >> a;
if(a.length()<=19){
int n=stoi(a);
cin >> n
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d==0){
n/=d;
cout << d <<" ";
}
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2016253, 2024-09-28 11:28:58, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string a;
cin >> a;
if(a.length()<=19){
int n=stoi(a);
cin >> n
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d==0){
n/=d;
cout << d <<" ";
}
}
d+=1;
}
}
else{
break;
}
}
}
} | # 2016344, 2024-09-28 11:35:36, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int d=2;
//int n;
string a;
cin >> a;
if(a.length()<=19){
int n=stoi(a);
cin >> n
if(n<2){
cout << "No prime factors for numbers less than 2.";
break;
}
else{
while(true){
if(n>1){
if((d*d)>n){
cout << n << " ";
break;
}
else{
while(true){
if(n%d==0){
n/=d;
cout << d <<" ";
}
}
d+=1;
}
}
else{
break;
}
}
}
} |
# 2015055, 2024-09-28 09:32:24, -xxxxxxxxxxxxxxx-- (0%)
#include<iostream>
using namespace std;
int main(){
int n,d;
cin >> n;
if(n<2){
cout << "No prime factors for number less than 2.";
} else {
if(n>1)
if(d*d>n){
cout << n;
}
if(n%d==0){
n/=d;
cout << d;
} else {
d+=1;
}
}
return 0;
} | # 2015096, 2024-09-28 09:34:24, -xxxxxxxxxxxxxxx-- (0%)
#include<iostream>
using namespace std;
int main(){
int n,d;
cin >> n >> d;
if(n<2){
cout << "No prime factors for number less than 2.";
} else {
if(n>1)
if(d*d>n){
cout << n;
}
if(n%d==0){
n/=d;
cout << d;
} else {
d+=1;
}
}
return 0;
} | # 2015106, 2024-09-28 09:35:18, ------------------ (0%)
#include<iostream>
using namespace std;
int main(){
int n,d;
cin >> n >> d;
d=2;
if(n<2){
cout << "No prime factors for number less than 2.";
} else {
if(n>1)
if(d*d>n){
cout << n;
}
if(n%d==0){
n/=d;
cout << d;
} else {
d+=1;
}
}
return 0;
} | # 2015192, 2024-09-28 09:43:26, Compilation error (0%)
#include<iostream>
using namespace std;
int main(){
int n,d;
cin >> n >> d;
d=2;
if(n<2){
cout << "No prime factors for number less than 2.";
} else {
if(n>1)
if(d*d>n){
cout << n;
}
if(n%d==0){
n/=d;
cout <<
} else {
d+=1;
}
}
return 0;
} | # 2016364, 2024-09-28 11:36:55, ------------------ (0%)
#include<iostream>
using namespace std;
int main(){
int N,d;
cin >> N >> d;
d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
if(N>1){
d+=1;
} else {
cout << N;
}
if(N%d==0){
N/=d;
cout << d;
}else{
d+=1;
}
} | # 2016453, 2024-09-28 11:42:46, ------------------ (0%)
#include<iostream>
using namespace std;
int main(){
int N,d;
cin >> N >> d;
d=2;
if(N<2){
cout << "No prime factors for numbers less than 2.";
}
if(N>1){
d+=1;
} else {
cout << N;
}
if(N%d==0){
N/=d;
cout << d;
}else{
d+=1;
}
cout << N << d;
return 0;
} |
# 2014873, 2024-09-28 09:11:49, Compilation error (0%)
#include <bits/stdc++.h>
using namespace std;
int main (){
int N;
cin >> N;
string number =
} | # 2015731, 2024-09-28 10:36:26, Compilation error (0%)
#include <bits/stdc++.h>
using namespace std;
int N,d;
{
if (N<2)
{
"No prime factors for numbers less than 2"
}
} | # 2015733, 2024-09-28 10:36:41, Compilation error (0%)
#include <bits/stdc++.h>
using namespace std;
int N,d;
{
if (N<2)
{
"No prime factors for numbers less than 2"
}
}
return 0; | # 2015996, 2024-09-28 11:02:26, Compilation error (0%) #include <bits/stdc++.h> using namespace std; int N; int d=2; cin >> N; if(N<2) cout << "No prime factors for numbers less than 2"; return 0; | # 2016012, 2024-09-28 11:03:55, Compilation error (0%)
#include <bits/stdc++.h>
using namespace std;
int N;
int d=2;
cin >> N;
if( N<2)
{
cout << "No prime factors for numbers less than 2";
}
return 0; |
# 2015886, 2024-09-28 10:53:46, -T-TT-T-T-TTTTTT-- (0%)
#include <iostream>
using namespace std;
int main(){
int N;
cin >> N;
int d = 2;
if(N < 2){
cout << "No prime factors for number less";
}
else{
while(N>1){
if(d*d > N){
//component of N
for(int i=2; i < N/2; i++){
if(N % i == 0){
cout << i << " ";
}
}
}
else{
while(N%d == 0){
N /= d;
//component of d
for(int i=2; i < N/2; i++){
if(d % i == 0){
cout << i << " ";
}
}
}
d += 1;
}
}
}
} |
# 2015553, 2024-09-28 10:17:34, Compilation error (0%)
#include <iostream>
using namespace std;
int main() {
int n;
int %d=2
if(n<2) {
std:: cout <<"no prime factors for numbers less than 2 ";
} else if(n>1){
}
} |