1.9 编程基础之二分查找 13:整数去重 python
生活随笔
收集整理的这篇文章主要介绍了
1.9 编程基础之二分查找 13:整数去重 python
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
http://noi.openjudge.cn/ch0109/13/
"""1.9 编程基础之二分查找 13:整数去重 http://noi.openjudge.cn/ch0109/13/Python字符串去重 https://www.jianshu.com/p/b9162f389b5c https://www.cnblogs.com/zhenghiber/p/15110871.htmlPython:对输入的单词进行字典序排序输出 https://www.cnblogs.com/JodieRao/p/12635910.htmlPython 程序按字母顺序对单词进行排序 https://www.nhooo.com/python/python-examples-alphabetical-order.htmlPython常用的几种去重方式 https://blog.csdn.net/qq_40304090/article/details/82020576python实现整数去重并排序 https://blog.csdn.net/weixin_45912307/article/details/108661232"""n=int(input())a=list(map(int,input().split(' ')))#a.sort()b=[]for word in a:if not word in b:b.append(word)for i in b:print(i,end=' ')C++代码:
/* 1.9编程基础之顺序查找_13整数去重 http://noi.openjudge.cn/ch0109/13/ */ #include <bits/stdc++.h> using namespace std; int main( void ) {int n,a,h[20010]={0};cin>>n;for (int i=1;i<=n;i++){cin>>a;if (h[a]==0) {cout<<a<<" ";} h[a]++; }return 0; }总结
以上是生活随笔为你收集整理的1.9 编程基础之二分查找 13:整数去重 python的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: php微信网页开发实现自动登录注册功能实
- 下一篇: 小学奥数 7830 求小数的某一位 py