| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
什么意思啊 1183#include <iostream>
#include <math.h>
using namespace std;
int main()
{
long long c,a,b,x,y,u;
cin>>a;
b=a*a+1;
c=floor(sqrt(b));
u=100000;
u*=10000000;
for (x=1;x<=c;x++)
{
y=b/x;
if (b==x*y)
if (u>x+y)
u=x+y;
}
cout<<u+2*a<<endl;
}
有人能讲解一下上面这个程序的思路么!
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator