摘要:
月饼是久负盛名的中国传统糕点之一,自唐朝以来,已经发展出几百品种。 若想评比出一种“最好吃”的月饼,那势必在吃货界引发一场腥风血雨…… 在这里我们用数字说话,给出全国各地各种月饼的销量,要求你从中找出销量冠军,认定为最好吃的月饼。 输入格式: 输入首先给出两个正整数 N(≤1000)和 M(≤100 阅读全文
摘要:
如果某个数 K 的平方乘以 N 以后,结果的末尾几位数等于 K,那么就称这个数为“N-自守数”。例如 3×922=25392,而 25392 的末尾两位正好是 92,所以 92 是一个 3-自守数。 本题就请你编写程序判断一个给定的数字是否关于某个 N 是 N-自守数。 输入格式: 输入在第一 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
For a student taking the online course "Data Structures" on China University MOOC (http://www.icourse163.org/), to be qualified for a certificate, he/ 阅读全文