上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 89 下一页
摘要: 月饼是久负盛名的中国传统糕点之一,自唐朝以来,已经发展出几百品种。 若想评比出一种“最好吃”的月饼,那势必在吃货界引发一场腥风血雨…… 在这里我们用数字说话,给出全国各地各种月饼的销量,要求你从中找出销量冠军,认定为最好吃的月饼。 输入格式: 输入首先给出两个正整数 N(≤1000)和 M(≤100 阅读全文
posted @ 2019-03-01 21:18 王清河 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 如果某个数 K 的平方乘以 N 以后,结果的末尾几位数等于 K,那么就称这个数为“N-自守数”。例如 3×92​2​​=25392,而 25392 的末尾两位正好是 92,所以 92 是一个 3-自守数。 本题就请你编写程序判断一个给定的数字是否关于某个 N 是 N-自守数。 输入格式: 输入在第一 阅读全文
posted @ 2019-03-01 21:17 王清河 阅读(497) 评论(0) 推荐(0) 编辑
摘要: When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container, or we might get ourselves in s 阅读全文
posted @ 2019-03-01 21:10 王清河 阅读(425) 评论(0) 推荐(0) 编辑
摘要: Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1 阅读全文
posted @ 2019-03-01 20:52 王清河 阅读(668) 评论(0) 推荐(0) 编辑
摘要: Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specification: Each input file contains 阅读全文
posted @ 2019-03-01 20:24 王清河 阅读(277) 评论(0) 推荐(0) 编辑
摘要: After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the rank 阅读全文
posted @ 2019-03-01 20:23 王清河 阅读(323) 评论(0) 推荐(0) 编辑
摘要: Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... where D is in [0, 9] except 1. The (n+1)s 阅读全文
posted @ 2019-03-01 20:22 王清河 阅读(397) 评论(0) 推荐(0) 编辑
摘要: Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that 阅读全文
posted @ 2019-03-01 20:21 王清河 阅读(262) 评论(0) 推荐(0) 编辑
摘要: For a student taking the online course "Data Structures" on China University MOOC (http://www.icourse163.org/), to be qualified for a certificate, he/ 阅读全文
posted @ 2019-03-01 20:21 王清河 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 划拳是古老中国酒文化的一个有趣的组成部分。酒桌上两人划拳的方法为:每人口中喊出一个数字,同时用手比划出一个数字。如果谁比划出的数字正好等于两人喊出的数字之和,谁就赢了,输家罚一杯酒。两人同赢或两人同输则继续下一轮,直到唯一的赢家出现。 下面给出甲、乙两人的划拳记录,请你统计他们最后分别喝了多少杯酒。 阅读全文
posted @ 2019-02-28 22:08 王清河 阅读(126) 评论(0) 推荐(0) 编辑
上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 89 下一页