delete pics to save space
This commit is contained in:
21
history_source/ccf 入门篇/U4/4.6.3.cpp
Normal file
21
history_source/ccf 入门篇/U4/4.6.3.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include<iostream>
|
||||
#include<cmath>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
int n,a,b;
|
||||
while(true)
|
||||
{
|
||||
cin>>n;
|
||||
for(int i=2;i*i<n;i++)
|
||||
{
|
||||
if(n%i==0)
|
||||
{
|
||||
a=i;
|
||||
b=n/a;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cout<<((a>b)?a:b)<<endl;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user