1176:谁考了第k名
时间: 2023-10-22 09:00:22 浏览: 141
根据给出的代码,这个程序的功能是找出考试中第k名学生的学号和成绩。程序读取了学生的人数n和要求的第k名学生的k,接着读取n行数据,每行包括一个学号和一个成绩。然后,程序使用选择排序算法将学生按照成绩从高到低进行排序,最后输出第k名学生的学号和成绩。
这个问题的输入样例为:
5 3
90788001 67.8
90788002 90.3
90788003 61
90788004 68.4
90788005 73.9
程序的输出样例为:
90788004 68.4
所以,根据给出的输入和输出样例,第3名学生的学号是90788004,成绩是68.4。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [谁考了第k名](https://blog.csdn.net/gz153016/article/details/80599426)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [1176:谁考了第k名](https://blog.csdn.net/enchanted_lb/article/details/110673547)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [信息学奥赛一本通 1176:谁考了第k名 | OpenJudge NOI 1.10 01:谁考了第k名](https://blog.csdn.net/lq1990717/article/details/123676125)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文