摘要: In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is supe 阅读全文
posted @ 2019-03-01 21:25 王清河 阅读(290) 评论(0) 推荐(0) 编辑
摘要: PAT 准考证号由 4 部分组成: 第 1 位是级别,即 T 代表顶级;A 代表甲级;B 代表乙级; 第 2~4 位是考场编号,范围从 101 到 999; 第 5~10 位是考试日期,格式为年、月、日顺次各占 2 位; 最后 11~13 位是考生编号,范围从 000 到 999。 现给定一系列考生 阅读全文
posted @ 2019-03-01 21:21 王清河 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 给定两个字符串 A 和 B,本题要求你输出 A+B,即两个字符串的并集。要求先输出 A,再输出 B,但重复的字符必须被剔除。 输入格式: 输入在两行中分别给出 A 和 B,均为长度不超过 10​6​​的、由可见 ASCII 字符 (即码值为32~126)和空格组成的、由回车标识结束的非空字符串。 输 阅读全文
posted @ 2019-03-01 21:19 王清河 阅读(642) 评论(0) 推荐(0) 编辑
摘要: 2004 年 7 月,谷歌在硅谷的 101 号公路边竖立了一块巨大的广告牌(如下图)用于招聘。内容超级简单,就是一个以 .com 结尾的网址,而前面的网址是一个 10 位素数,这个素数是自然常数 e 中最早出现的 10 位连续数字。能找出这个素数的人,就可以通过访问谷歌的这个网站进入招聘流程的下一步 阅读全文
posted @ 2019-03-01 21:19 王清河 阅读(1305) 评论(0) 推荐(0) 编辑
摘要: 月饼是久负盛名的中国传统糕点之一,自唐朝以来,已经发展出几百品种。 若想评比出一种“最好吃”的月饼,那势必在吃货界引发一场腥风血雨…… 在这里我们用数字说话,给出全国各地各种月饼的销量,要求你从中找出销量冠军,认定为最好吃的月饼。 输入格式: 输入首先给出两个正整数 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) 编辑