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

为什么(float)去掉就ac呢

Posted by hello1807 at 2009-05-28 20:28:01 on Problem 2623
if(m%2==0)
        {

            printf("%.1f\n",(float)a[m/2]/2.0+(float)a[m/2-1]/2.0);
            }
            else
            {

                printf("%.1f\n",(float)a[m/2]);
                }
                return 0;
    }

这样就wa;
if(m%2==0)
        {

            printf("%.1f\n",a[m/2]/2.0+a[m/2-1]/2.0);
            }
            else
            {

                printf("%.1f\n",(float)a[m/2]);
                }
                return 0;
    }


这样就ac;
疑惑啊

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