Time limit:1000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)
Total submission (s): 16377 Accepted Submission (s): 10155
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 Input
23 170.00 165.00 180.004 165.00 182.00 172.00 160.00
Sample Output
180.00182.00
Problem description
In a class there are some students who can help teachers find the highest students.
Input
In some cases. The first line contains an integer t, which is an example; in each case there is an integer N (1≤n 100,n≤) that follows the student's height.
Output
For each case the maximum height of the output, the height reserved 2 decimal places;
#include <stdio.h>
Main ()
{
float a,b,x[1000];
int i,j,n,k;
scanf ("%d", &n);
while (n--)
{
scanf ("%d", &k);
for (i=0;i<k;i++)
scanf ("%f", &x[i]);
B=X[0];
for (i=0;i<k;i++)
if (B<x[i])
B=x[i];
printf ("%.2f\n", b);
}
return 0;
}
Max Num (maximum number)