#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2021/7/12 9:04
# @Author : wutiande
class Solution:
def hIndex(self, citations: list) -> int:
re = 0
length = len(citations)
for i in range(length):
if (citations[i] >= length-i) and (length-i>re):
re = length-i
print(re)
if __name__ == '__main__':
"""测试"""
citations = [0,2,3,5,6]
s = Solution()
s.hIndex(citations)
275.H指数Ⅱ
最新推荐文章于 2024-04-15 10:29:21 发布