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. CSS3 loading 和 文字颜色渐变

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

  2. html 零散问题

    1.iconfont的使用 https://www.cnblogs.com/yujihang/p/6706056.html 2.阴影效果比较 box-shadow:0 0 6px #000 inset ...

  3. SqlServer2012学习 - 基本数据类型认知

    精确数字: 1.整数 int是Sql Server主要整数类型.tinyint,smallint,int 不会自动转成bigint. 大于 2,147,483,647 的整数常量将转换为 decima ...

  4. Zend Studio 服务器根目录设置

    在 Apache 服务器根目录里查找 \conf\httpd.conf 例如:C:\AppServ\Apache24\conf\httpd.conf 打开后查找 DocumentRoot 标记 修改调 ...

  5. CAD参数绘制角度标注(com接口)

    主要用到函数说明: _DMxDrawX::DrawDimAngular 绘制一个角度标注.详细说明如下: 参数 说明 DOUBLE dAngleVertexX 角度标注的顶点的X值 DOUBLE dA ...

  6. element-UI el-table添加序号列时序号永远都是从1开始?

    Part.1 示例 当我们想在 el-table 中添加序号列时,如下: <el-table-column label="序号" type="index" ...

  7. A、B、C、D四个字母,能组成多少个互不相同且无重复三位组合

    package 第五天的作业;/* * A.B.C.D四个字母,能组成多少个互不相同且无重复三位组合 */public class Demo14 { public static void main(S ...

  8. sqllite相关总结

    一,sqlite 简介 前面写了一篇博文讲如何在 C# 中使用 ADO 访问各种数据库,在移动开发和嵌入式领域也有一个轻量级的开源关系型数据库-sqlite.它的特点是零配置(无需服务器),单磁盘文件 ...

  9. 笔试算法题(03):最小第K个数 & 判定BST后序序列

    出题:输入N个整数,要求输出其中最小的K个数: 分析: 快速排序和最小堆都可以解决最小(大)K个数的问题(时间复杂度为O(NlogN)):另外可以建立大小为K的最大堆,将前K个数不断插入最大堆,对于之 ...

  10. MongoDB安装与配置启动

    1.下载安装包.mongodb-linux-x86_64-rhel62-3.6.3.tgz 2.解压.修改名字. 3.修改配置文件: # mongodb.conf #where to loglogpa ...