acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • Python

    n = int(input()) nums = list(map(int, input().split())) candidate = None count = 0 for num in nums: if count == 0: candidate = num count = 1 elif num == candidate: count += 1 else: count -= 1 print(candidate)

    userId_undefined

    151****2498

    0阅读
    0回复
    0点赞
  • map__

    userId_undefined

    有事找大号

    0阅读
    0回复
    0点赞

共62条

  • 1
  • 2
  • 3
  • 4
20条/页
跳至页
首页