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

Re:高手帮看看错在那里,小弟初来乍到,多谢了……

Posted by hello1807 at 2009-02-19 10:17:25 on Problem 1032
In Reply To:高手帮看看错在那里,小弟初来乍到,多谢了…… Posted by:zhaorenliang at 2008-10-05 12:27:01
> #include<iostream>
> using namespace std;
> int a=0;
> int N;
> int main()
> {int i ,j; 
> cin>>N;
> for(i=1;i<=N/2;i++)
> for(j=N;j>N/2;j--){if((i+j)==N)
> {
> if(a<(i*j)) {a=(i*j);}
> 
> }}
> for(i=1;i<=N/2;i++)
> for(j=N;j>N/2;j--){if((i*j)==a&&(i+j)==N)
> {cout<<i<<"  ";
> cout<<j<<endl;}
> } 
> return(0);
> 又没说之分两组

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