摘要: Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as: That is 阅读全文
posted @ 2018-03-10 15:05 王清河 阅读(116) 评论(0) 推荐(0) 编辑
摘要: A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a progra 阅读全文
posted @ 2018-03-10 09:44 王清河 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印 所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。 给定任意N个符号,不一定能正好组成一个沙漏。要求打印出的沙漏能 阅读全文
posted @ 2018-03-09 16:18 王清河 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 美国总统奥巴马不仅呼吁所有人都学习编程,甚至以身作则编写代码,成为美国历史上首位编写计算机代码的总统。2014年底,为庆祝“计算机科学教育周”正式启动,奥巴马编写了很简单的计算机代码:在屏幕上画一个正方形。现在你也跟他一起画吧! 输入格式: 输入在一行中给出正方形边长N(3<=N<=20)和组成正方 阅读全文
posted @ 2018-03-09 13:08 王清河 阅读(117) 评论(0) 推荐(0) 编辑
摘要: This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Inp 阅读全文
posted @ 2018-03-09 12:54 王清河 阅读(131) 评论(0) 推荐(0) 编辑
摘要: At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door 阅读全文
posted @ 2018-03-09 11:11 王清河 阅读(129) 评论(0) 推荐(0) 编辑
摘要: With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing ba 阅读全文
posted @ 2018-03-09 10:29 王清河 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 为了用事实说明挖掘机技术到底哪家强,PAT组织了一场挖掘机技能大赛。现请你根据比赛结果统计出技术最强的那个学校。 输入格式: 输入在第1行给出不超过105的正整数N,即参赛人数。随后N行,每行给出一位参赛者的信息和成绩,包括其所代表的学校的编号(从1开始连续编号)、及其比赛成绩(百分制),中间以空格 阅读全文
posted @ 2018-03-08 19:08 王清河 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 某城镇进行人口普查,得到了全体居民的生日。现请你写个程序,找出镇上最年长和最年轻的人。 这里确保每个输入的日期都是合法的,但不一定是合理的——假设已知镇上没有超过200岁的老人,而今天是2014年9月6日,所以超过200岁的生日和未出生的生日都是不合理的,应该被过滤掉。 输入格式: 输入在第一行给出 阅读全文
posted @ 2018-03-08 18:49 王清河 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 读入n名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。 输入格式:每个测试输入包含1个测试用例,格式为 其中姓名和学号均为不超过10个字符的字符串,成绩为0到100之间的一个整数,这里保证在一组测试用例中没有两个学生的成绩是相同的。 输出格式:对每个测试用例输出2行,第1行是成 阅读全文
posted @ 2018-03-08 14:55 王清河 阅读(164) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示