HDU-2071 Max Num

代码

#include <iostream>

using namespace std;

int main() {
	
	int n;
	cin>>n;
	
	for(int i=0; i<n; i++){
		int m;
		cin>>m;
		double max;
		cin>>max;
		for(int j=1; j<m; j++){
			double tmp;
			cin>>tmp;
			if(tmp>max){
				max = tmp;
			}
		}
		printf("%.2lf\n", max);
	} 
	
	return 0;
}

注解

1、水题。
2、注意输出格式。

结果

HDU-2071 Max Num

相关文章:

  • 2021-08-27
  • 2022-02-01
  • 2022-01-20
  • 2021-09-08
  • 2021-07-05
  • 2022-03-05
  • 2021-09-24
  • 2021-09-01
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2022-01-12
相关资源
相似解决方案