Max Num---hdu2071

Source: Internet
Author: User

Max Num

Time limit:1000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)
Total submission (s): 16818 Accepted Submission (s): 10381


Problem Descriptionthere is some students in a class, Can-Help teacher find the highest student.

Inputthere is some cases. The first line contains an integer t, indicate the cases; Each case has an integer n (1≤n≤100), followed n students ' height.

Outputfor each case output of the highest height, the height to both decimal plases;

Sample Input2 3 170.00 165.00 180.00 4 165.00 182.00 172.00 160.00

Sample Output180.00 182.00
1#include <stdio.h>2 intMain ()3 {4     intn,a,i,j;5     Doubles[101],max;6scanf"%d",&n);7      while(n--)8     {9scanf"%d",&a);Ten          for(i=0; i<a;i++) Onescanf"%LF",&s[i]); Amax=s[0]; -          for(i=1; i<a;i++) -Max=max>s[i]?Max:s[i]; theprintf"%.2lf\n", max); -     } -     return 0; -}

Max Num---hdu2071

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.