| ||||||||||
| 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 | |||||||||
将a也设为_int64试试In Reply To:还是WA阿。。。。。。。。 Posted by:waterine at 2003-07-22 23:53:07 >
> #include <iostream.h>
> #include <math.h>
> void main(){
> int a;
> __int64 temp,b,c;
>
> cin >> a;
> temp=a*a+1;
> for(__int64 i=a; i>0; i--){
> if(temp%i == 0) {b=i;
> c=temp/i;
> break;}
> }
> cout <<int(a*2+b+c) << endl;
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator