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:水过,贴AC代码

Posted by Kurunie at 2014-08-19 20:48:17 on Problem 3536
In Reply To:水过,贴AC代码 Posted by:caizixian at 2010-02-15 10:06:36
> Source Code
> Problem: 3536		User: caizixian
> Memory: 696K		Time: 563MS
> Language: G++		Result: Accepted
> 
>     * Source Code
> 
>       #include<iostream>
>       #include<cmath>
>       using namespace std;
>       int main()
>       {
>       int i,j,k,n,m=1000000000;
>       int mi,mj,mk;
>       cin>>n;
>       for(i=1;i<=sqrt(n)+1;++i)
>       {
>       if(n%i==0)
>       {
>       for(j=1;j<=n/i;++j)
>       {
>       k=i*j;if(n%k==0)
>       {
>       k=n/k;if(i*j+i*k+j*k<m)
>       {
>       m=i*j+i*k+j*k;mi=i;mj=j;mk=k;
>       }
>       }
>       }
>       }
>       }
>       cout<<mi<<" "<<mj<<" "<<mk<<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