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