题目描述:
There are some students in a class, Can you help teacher find the highest student .
简直是最水的题了,不过打算从后面开始要用C#提交了,所以先水一把,AC代码:
using System;
using System.Collections.Generic;
using System.Linq;
namespace a1
{
class Program
{
public static void Main(string[] args)
{
int n;
string str=string.Empty;
str=Console.ReadLine();
n=Convert.ToInt32(str);
while(n-->0){
str=Console.ReadLine();
string[] s=str.Split(' ');
int k=Convert.ToInt32(s[0]);
double[] a=new double[k];
for(int i=0;i<k;i++)
a[i]=Convert.ToDouble(s[i+1]);
double t=a[0];
for(int i=1;i<k;i++)
if(a[i]>t) t=a[i];
Console.WriteLine("{0}",t.ToString("0.00"));
}
}
}
}