Problem Description
There are some students in a class, Can you help teacher find the highest student .
 
Input
There are some cases. The first line contains an integer t, indicate the cases; Each case have an integer n ( 1 ≤ n ≤ 100 ) , followed n students’ height.
 
Output
For each case output the highest height, the height to two decimal plases;
 
Sample Input
2
3
170.00 165.00 180.00
4
165.00 182.00 172.00 160.00
 
Sample Output
180.00
182.00
 
 #include <stdio.h>

 int main(){
int T;
int n;
double number;
int i;
double max; scanf("%d",&T); while(T--){
scanf("%d",&n); for(i=;i<n;i++){
scanf("%lf",&number); if(i==)
max=number; if(number>max)
max=number;
} printf("%.2lf\n",max);
}
return ;
}

Max Num的更多相关文章

  1. JSU省赛队员选拔赛个人赛1(Coin Change、Fibbonacci Number、Max Num、单词数、无限的路、叠筐)

    JSU省赛队员选拔赛个人赛1 一.题目概述: A.Coin Change(暴力求解.动态规划)     B.Fibbonacci Number(递推求解) C.Max Num(排序.比较) D.单词数 ...

  2. HDOJ 2071 Max Num

    Problem Description There are some students in a class, Can you help teacher find the highest studen ...

  3. HDU 2071 Max Num

    http://acm.hdu.edu.cn/showproblem.php?pid=2071 Problem Description There are some students in a clas ...

  4. Max Num---hdu2071

    Max Num Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Sub ...

  5. HDOJ-1003 Max Sum(最大连续子段 动态规划)

    http://acm.hdu.edu.cn/showproblem.php?pid=1003 给出一个包含n个数字的序列{a1,a2,..,ai,..,an},-1000<=ai<=100 ...

  6. [ACM] hdu 1003 Max Sum(最大子段和模型)

    Max Sum Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Su ...

  7. Max Chunks To Make Sorted II LT768

    This question is the same as "Max Chunks to Make Sorted" except the integers of the given ...

  8. Max Chunks To Make Sorted LT769

    Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split the array into som ...

  9. 判定一个数num是否为x的幂

    那个数所在类型中,x的幂最大值为max 1.则第一条判定:max%num==0: 若x不为任何数的幂,则第一条判定足矣. 若x为某个数的幂,则要加判定条件 2.(num-1)%(x-1)==0 同时满 ...

随机推荐

  1. tomcat 修改端口

    修改tomcat端口号: a) 去tomcat安装目录(或者解压目录)下的“conf”文件夹中找到文件“server.xml”(本例:“D:\Program Files\Apache Software ...

  2. Snort里如何将读取的包记录存到指定的目录下(图文详解)

    不多说,直接上干货! 比如,在/root/log目录下. [root@datatest ~]# snort -dve -l /root/log 需要注意: 1) /log目录需要你自己建立,并修改权限 ...

  3. c语言-依赖倒转

    当一个文件(aa.c文件)依赖于头文件(bb.h)时,如果bb.c编译之后形成的bb.o文件重新编译后,aa.o的文件不需要重新编译 aa.c文件: bb.h文件:对bb.c文件进行声明 bb.c文件 ...

  4. [BZOJ1192][HNOI2006]鬼谷子的钱袋 数学

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1192 大水题,把m分成二的幂次方和. #include<cstdio> #in ...

  5. ES3之bind方法的实现模拟

    扩展Function原型方法,此处用myBind来模拟bind实现 Function.prototype.myBind = function(o /*,args*/){       //闭包无法获取t ...

  6. Vue 路由知识二(工程模式下路由的配置)

    vue-router是一个插件包,所以我们还是需要用npm/cnpm来进行安装的:npm/cnpm install vue-router --save-dev. 在路由的核心文件:src/router ...

  7. webpac入门

    基于node环境,必须确保node已经安装:node-v,npm-v 基础入门 前身:browserify 缺点:只能转化JS webpack作用:一切都是模块化(js.css图片等),一个模块加载器 ...

  8. git 出现 The current branch is not configured for pull No value for key branch.master.merge found in configuration

    以下是我在网上找到的不错的文章,我参考后已解决我的问题: http://my.oschina.net/robinsonlu/blog/144085 http://www.cnblogs.com/zha ...

  9. CSS3 loading 和 文字颜色渐变

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. caffe blob理解

    blob数据结构是caffe中基本的数据存储单元,它主要存储的数据是网络中的中间数据变量,比如各层的输入和输出:代价函数关于网络各层参数的梯度. blob中除了存储数据外,还有一些标记数据的参数,以下 ...