程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

[Python implementation of Huawei machine test] statistics of shooting competition results

編輯:Python

List of articles

  • Preface
  • Title Description
  • Example 1
  • Reference code


Preface

《 Huawei machine test real problem Python Realization 》 The column includes Huawei column of niuke.com 、 Huawei test questions 、 Huawei OD Real problem of machine test .

If you are preparing for Huawei's interview , If you want to know something, you can send me a private letter , I will try my best to help you , I can also give you some suggestions !

This paper solves the non optimal solution ( Non optimal performance ).

For detailed analysis, see 《【 Detailed explanation of Huawei's machine test questions 】 Count the results of shooting competitions 》

Title Description

Given a shooting competition report card , Contains scores of several shots of multiple players , Please press the highest for each player 3 Sum of scores
Rank in descending order , Output the players ranked in descending order ID Sequence , The conditions are as follows :

  1. A player can have multiple shooting scores , And the order is not fixed
  2. If a player scores less than 3 individual , It is considered that all the results of the contestant are invalid , The ranking ignores the player
  3. If the sum of the players' scores is equal , Then the players with the same sum of results will be in accordance with their ID Descending order

Input description :

first line , An integer N, It means that the game has been played for a total of N Shots , produce N Scores (2<=N<=100)

The second line , A length of N Integer sequence of ÿ


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved