HDU 2071 JAVA
来源:互联网 发布:2008年网络流行歌曲 编辑:程序博客网 时间:2024/06/06 02:53
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
import java.util.Scanner;public class Main { public static void main(String args[]){ Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t-->0){ int n=sc.nextInt(); double max=sc.nextDouble(); for(int j=1;j<n;j++){ double m=sc.nextDouble(); if(m>max) max=m; } System.out.printf("%.2f",max); System.out.println(); } }}
0 0
- HDU 2071 JAVA
- hdu acm hdu 2115 Java
- Exponentiation hdu 1063 java
- hdu 1313 (Java)
- 【Java】hdu 4043
- hdu 1242 Rescue<java>
- HDU 1002 JAVA
- hdu 2092(java)
- hdu 1063 java 高精度
- hdu 1106(java)
- hdu 1073(java)
- HDU-4762 Java高精度
- hdu 1002 java
- hdu 1089 java
- JAVA hdu 2192 MagicBuilding
- hdu 1001 java
- hdu 1002 java
- hdu 1003 java
- HDU 2070 JAVA
- caffe学习笔记3-matcaffe接口学习
- sdutacm-大家快来A水题
- Android逆向笔记之AndroidKiller与Android Studio的使用
- POJ 2342 树形dp
- HDU 2071 JAVA
- Java中常用的类型转换汇总
- 实例:sizeof一个指针或者一个数组
- 新搭建后台server服务? oh no!------程序员的脑力劳动和体力劳动
- sdutacm-图结构练习——最短路径
- 再遇牛顿迭代法
- HDU 2072 JAVA
- 深入浅出java入门 之 无参带返回值方法的使用
- EditText