当前位置:网站首页>HJ explicit random number
HJ explicit random number
2022-06-28 07:38:00 【Courageous steak】
describe
Clearly generated NN individual 1 To 500 Random integer between . Please delete the duplicate numbers , That is, only one of the same numbers is retained , Take out the rest of the same number , And then sort the numbers from small to large , Output according to the arranged order .
Data range : 1≤n≤1000, The size of the input number meets 500≤val≤500
Input description :
In the first line, enter the number of random integers N . Next N Line enter an integer for each line , Represents the random number clearly generated . For the specific format, please refer to the following " Example ".
Output description :
Output multiple lines , Indicates the result of input data processing
Example :
Input :3
2
2
1
Output :1
2
explain : Enter an explanation :
The first number is 3, That's what this little example is about N=3, It's computer generated 3 individual 1 To
500 Random integer between , Next, a random number per line , common 3 That's ok , That's what it is 3 Ge Sui
The machine number is :
2
2
1
So the output of the sample is :
1
2
Cattle guest HJ:python3:
nums = []
N = input()
while True:
try:
nums.append(int(input()))
except:
break
list2 = list(set(nums))
list2.sort()
for i in list2:
print(i)
Link to the original text :
https://www.920vip.net/article/175
边栏推荐
- PLC -- Notes
- "Three routines" of digital collection market
- 7-1 understand everything
- Sentinel mechanism of redis cluster
- Makefile
- Force buckle 515 Find the maximum value in each tree row
- 推荐系统系列精讲(第五讲): 排序模型的调优实践
- Construction and exploration of vivo database and storage platform
- NDK cross compilation
- Analyze 5 indicators of NFT project
猜你喜欢

Jetpack - defects of livedata component and Countermeasures

ACM笔记

A single node obtains the lock lock of the order number

Section Xi. Axi of zynq_ Use of DMA

Section 5: zynq interrupt

Practice and exploration of vivo live broadcast application technology

Tencent continued to lay off staff in the second half of the year, and all business groups reduced by at least 10%. What do you think of this? Followers

PLC -- Notes

Hash slot of rediscluster cluster cluster implementation principle

扩展Prometheus的解决方案thanos的简介和几个月使用心得
随机推荐
Uninstall and reinstall the latest version of MySQL database. The test is valid
Installing redis on Linux
Section VI UART of zynq
R 语言 Hitters 数据分析
Rediscluster cluster mode capacity expansion node
Open62541 import nodeset file directly
以动态规划的方式求解最长回文子串
网传互联网公司加班表,排名第一的没悬念
Code submission specification
一个小工具可以更快的写爬虫
Evolution of vivo push platform architecture
R language Kolmogorov Smirnov tests whether the two samples follow the same distribution.
HJ进制转换
Real time database - Notes
Resizing node of rediscluster cluster cluster mode
HJ成绩排序
Install haproxy
PLC -- Notes
How to configure DDR3 of dm8148
Spark 离线开发框架设计与实现