摘要: A1012 The Best Rank (25)(25 分) To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C C 阅读全文
posted @ 2018-08-16 15:27 lingr7 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1009 说反话 (20)(20 分) 给定一句英语,要求你编写程序,将句中所有单词的顺序颠倒输出。 输入格式: 测试输入包含一个测试用例,在一行内给出总长度不超过80的字符串。字符串由若干单词和若干空格组成,其中单词是由英文字母(大小写有区分)组成的字符串,单词之间用1个空格分开,输入保证句子末尾 阅读全文
posted @ 2018-08-13 10:21 lingr7 阅读(510) 评论(1) 推荐(1) 编辑
摘要: A1055 The World's Richest(25 分) Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest pe 阅读全文
posted @ 2018-08-11 19:43 lingr7 阅读(454) 评论(0) 推荐(0) 编辑
摘要: A1025 PAT Ranking (25)(25 分) Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Eac 阅读全文
posted @ 2018-08-11 17:13 lingr7 阅读(248) 评论(0) 推荐(0) 编辑
摘要: A1016 Phone Bills (25)(25 分) A long distance telephone company charges its customers by the following rules: Making a long distance call costs a certa 阅读全文
posted @ 2018-08-11 16:36 lingr7 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1015 德才论 (25)(25 分) 宋代史学家司马光在《资治通鉴》中有一段著名的“德才论”:“是故才德全尽谓之圣人,才德兼亡谓之愚人,德胜才谓之君子,才胜德谓之小人。凡取人之术,苟不得圣人,君子而与之,与其得小人,不若得愚人。” 现给出一批考生的德才分数,请根据司马光的理论给出录取排名。 输入格 阅读全文
posted @ 2018-08-10 11:26 lingr7 阅读(489) 评论(2) 推荐(0) 编辑
摘要: A1035 Password (20)(20 分) To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always 阅读全文
posted @ 2018-08-10 08:21 lingr7 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1048 数字加密(20 分) 本题要求实现一种数字加密方法。首先固定一个加密用正整数 A,对任一正整数 B,将其每 1 位数字与 A 的对应位置上的数字进行以下运算:对奇数位,对应位的数字相加后对 13 取余——这里用 J 代表 10、Q 代表 11、K 代表 12;对偶数位,用 B 的数字减去 阅读全文
posted @ 2018-08-10 07:57 lingr7 阅读(496) 评论(0) 推荐(1) 编辑
摘要: A1061 Dating (20)(20 分) Sherlock Holmes received a note with some strange strings: "Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm" 阅读全文
posted @ 2018-08-09 22:58 lingr7 阅读(221) 评论(1) 推荐(0) 编辑
摘要: 1024 科学计数法 (20)(20 分) 科学计数法是科学家用来表示很大或很小的数字的一种方便的方法,其满足正则表达式[+ ][1 9]"."[0 9]+E[+ ][0 9]+,即数字的整数部分只有1位,小数部分至少有1位,该数字及其指数部分的正负号即使对正数也必定明确给出。 现以科学计数法的格式 阅读全文
posted @ 2018-08-09 22:57 lingr7 阅读(370) 评论(0) 推荐(0) 编辑