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

这题别做了,这么写都ac

Posted by jklee at 2016-03-12 17:22:17 on Problem 2587
#include<stdio.h>
int main()
{
    double a,b,x,y,m=99999;
    int n;
    scanf("%d",&n);
    while(n--)
    {
        scanf("%lf%lf",&a,&b);
        if(m>a*a+b*b)
        {
            m=a*a+b*b;
            x=a;
            y=b;
        }
    }
    printf("%.2lf %.2lf\n",x,y);
    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