1060. 爱丁顿数(25) python篇
来源:互联网 发布:淘宝宝贝详情图片制作 编辑:程序博客网 时间:2024/06/06 11:05
1060. 爱丁顿数(25)
时间限制
250 ms
内存限制
65536 kB
代码长度限制
8000 B
判题程序
Standard
作者
CHEN, Yue
英国天文学家爱丁顿很喜欢骑车。据说他为了炫耀自己的骑车功力,还定义了一个“爱丁顿数”E,即满足有E天骑车超过E英里的最大整数E。据说爱丁顿自己的E等于87。
现给定某人N天的骑车距离,请你算出对应的爱丁顿数E(<=N)。
输入格式:
输入第一行给出一个正整数N(<=105),即连续骑车的天数;第二行给出N个非负整数,代表每天的骑车距离。
输出格式:
在一行中给出N天的爱丁顿数。
输入样例:106 7 6 9 3 10 8 2 7 8输出样例:
6
n=int(input())m=list(map(int,input().split()))m.sort(reverse = True)E=0for i in range(n): if m[i]>i+1: E+=1print(E)
0 0
- 1060. 爱丁顿数(25) python篇
- Patest 1060. 爱丁顿数(25) (python)
- 【Python】Python基础篇
- 【Python】Python模块篇
- 1070. 结绳(25) python篇
- 1020. 月饼 (25) Python篇
- 1055. 集体照 (25) python篇
- 1010. 一元多项式求导 (25) python篇
- 1045. 快速排序(25) python篇
- 1015. 德才论 (25) python篇
- 1050. 螺旋矩阵(25) python篇
- 1025. 反转链表 (25) python篇
- 新手学python 第五篇 Python基础
- - - -python 编码工具选择 - - - python 疑难杂症篇
- 【Python基础学习篇】Python控制语句
- 【Python基础学习篇】Python列表
- 【Python基础学习篇】Python字典
- 【Python基础学习篇】Python序列
- bug调试过程简单分析与小结(一)
- 归并排序C语言
- poj 2503 Babelfish (哈希)
- [php] 类自动载入代码
- 找出函数的最宽尖峰
- 1060. 爱丁顿数(25) python篇
- 初识LISP(2)——结构、循环与函数
- hadoop datanode启动不起来解决办法
- freebsd下安装mysql(percona5.7)
- Asp.net MVC中的ViewData与ViewBag
- android 查看端口号被占用
- Leetcode Integer Replacement
- React-Native 之 项目实战(四)
- Qt+ITK+VTK安装