摘要: To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords 阅读全文
posted @ 2018-03-13 12:35 王清河 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specificat 阅读全文
posted @ 2018-03-13 10:50 王清河 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each va 阅读全文
posted @ 2018-03-13 08:51 王清河 阅读(144) 评论(0) 推荐(0) 编辑
摘要: A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key 阅读全文
posted @ 2018-03-12 19:31 王清河 阅读(121) 评论(0) 推荐(0) 编辑
摘要: To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same s 阅读全文
posted @ 2018-03-12 18:58 王清河 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, 阅读全文
posted @ 2018-03-12 16:56 王清河 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given 阅读全文
posted @ 2018-03-12 15:06 王清河 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given s 阅读全文
posted @ 2018-03-12 12:55 王清河 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less t 阅读全文
posted @ 2018-03-12 10:47 王清河 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 本题要求实现一种数字加密方法。首先固定一个加密用正整数A,对任一正整数B,将其每1位数字与A的对应位置上的数字进行以下运算:对奇数位,对应位的数字相加后对13取余——这里用J代表10、Q代表11、K代表12;对偶数位,用B的数字减去A的数字,若结果为负数,则再加10。这里令个位为第1位。 输入格式: 阅读全文
posted @ 2018-03-12 10:35 王清河 阅读(209) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示