Initiate Luogu
This commit is contained in:
36
Luogu/P1128yinshu.cpp
Normal file
36
Luogu/P1128yinshu.cpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
cin>>n;
|
||||
long long m=n+1;
|
||||
bool flag=false;
|
||||
int js=0;
|
||||
while(flag==false)
|
||||
{
|
||||
js=0;
|
||||
for(int i=1;i<=m;i++)
|
||||
{
|
||||
if(m%i==0){
|
||||
js++;
|
||||
}
|
||||
}
|
||||
if(js==n){
|
||||
flag=true;
|
||||
}
|
||||
else{
|
||||
m++;
|
||||
}
|
||||
}
|
||||
cout<<m<<endl;
|
||||
/*
|
||||
for(int i=0;i<js;i++){
|
||||
cout<<a[i]<<" ";
|
||||
}
|
||||
cout<<endl;
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user