当前位置:网站首页>Contest3145 - the 37th game of 2021 freshman individual training match_ F: Smallest ball
Contest3145 - the 37th game of 2021 freshman individual training match_ F: Smallest ball
2022-07-04 02:34:00 【This question AC sleep again】
//
problem F: Smallest ball
The time limit : 1.000 Sec Memory limit : 128 MB
Title Description
Xiaohua is a cat who loves table tennis very much , Recently, it sneaked into the closed training ground of the Chinese table tennis team ( In preparation for the war 2017 World Table Tennis Championships in Germany , The Chinese men's team is in Shenzhen , The women's team is in Huangshi, Hubei , Conduct closed training separately ), Secretly playing table tennis . Floret found that the size of these balls is not exactly the same , It's a slight difference in size , After playing for a long time, it found that the smallest one was the most fun . Now Xiaohua wants to know the smallest of a pile of table tennis balls with known diameters .
Input
There are two lines of input data , The first line is a positive integer n, Indicates the number of table tennis balls . The second line is n Floating point types ( Two digits after the decimal point ), Represents the diameter of each ball d( In millimeters ), Numbers are separated by a space ,1<=n<=100,40<=d<41.
Output
The output has only one floating-point type per line , Represents the diameter of the smallest ball , Still keep two decimal places .
The sample input Copy
5
40.03 40.02 40.01 40.04 40.05
Sample output Copy
40.01
Tips
The diameter of the smallest ball is 40.01, So the answer is 40.01.
//
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,i;
double temp,ans;
while( ~scanf("%d%lf",&n,&ans) )
{
for( i=0;i<n-1;i++ )
{
scanf("%lf",&temp);
if( temp<ans ) ans=temp;
}
printf("%.2lf\n",ans);
}
return 0;
}
边栏推荐
- 求esp32C3板子連接mssql方法
- What is the student party's Bluetooth headset recommendation? Student party easy to use Bluetooth headset recommended
- What are the conditions for the opening of Tiktok live broadcast preview?
- 12. Gettimeofday() and time()
- Node write API
- Unity writes a character controller. The mouse controls the screen to shake and the mouse controls the shooting
- Unspeakable Prometheus monitoring practice
- Example 072 calculation of salary it is known that the base salary of an employee of a company is 500 yuan. The amount of software sold by the employee and the Commission method are as follows: Sales
- Global and Chinese market of contour projectors 2022-2028: Research Report on technology, participants, trends, market size and share
- Network byte order
猜你喜欢
[Yugong series] February 2022 attack and defense world advanced question misc-84 (MySQL)
VRRP+BFD
Li Chuang EDA learning notes 13: electrical network for drawing schematic diagram
What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
High level application of SQL statements in MySQL database (I)
I stepped on a foundation pit today
There is no need to authorize the automatic dream weaving collection plug-in for dream weaving collection
Applet graduation design is based on wechat course appointment registration. Applet graduation design opening report function reference
Network communication basic kit -- IPv4 socket structure
AI 助力藝術設計抄襲檢索新突破!劉芳教授團隊論文被多媒體頂級會議ACM MM錄用
随机推荐
Measurement fitting based on Halcon learning [4] measure_ arc. Hdev routine
C learning notes: C foundation - Language & characteristics interpretation
Yyds dry goods inventory override and virtual of classes in C
Unity knapsack system (code to center and exchange items)
Small program graduation design is based on wechat order takeout small program graduation design opening report function reference
Global and Chinese market of thin film deposition systems 2022-2028: Research Report on technology, participants, trends, market size and share
The reasons why QT fails to connect to the database and common solutions
Learn these super practical Google browser skills, girls casually flirt
Latex tips slash \backslash
Design and implementation of redis 7.0 multi part AOF
Comment la transformation numérique du crédit d'information de la Chine passe - t - elle du ciel au bout des doigts?
The difference between int (1) and int (10)
Hamburg University of Technology (tuhh) | intelligent problem solving as integrated hierarchical reinforcement learning
Dans la recherche de l'intelligence humaine ai, Meta a misé sur l'apprentissage auto - supervisé
What are the main investment products of bond funds and what are they
7 * 24-hour business without interruption! Practice of applying multiple live landing in rookie villages
Libcblas appears when installing opencv import CV2 so. 3:cannot open shared object file:NO such file or directory
Take you to master the formatter of visual studio code
Global and Chinese market for travel wheelchairs 2022-2028: Research Report on technology, participants, trends, market size and share
Reading notes - learn to write: what is writing?