Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

将a也设为_int64试试

Posted by 00130004 at 2003-07-23 00:12:58 on Problem 1183
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator