摘要: A1082 Read Number in Chinese (25)(25 分) Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Outpu 阅读全文
posted @ 2018-08-09 22:31 lingr7 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 1002 写出这个数 (20)(20 分) 读入一个自然数n,计算其各位数字之和,用汉语拼音写出和的每一位数字。 输入格式: 每个测试输入包含1个测试用例,即给出自然数n的值。这里保证n小于10^100^。 输出格式: 在一行内输出n的各位数字之和的每一位,拼音数字间有1 空格,但一行中最后一个拼音 阅读全文
posted @ 2018-08-06 20:49 lingr7 阅读(646) 评论(2) 推荐(0) 编辑
摘要: 7 32 7 32 说反话 加强版(20 分) 给定一句英语,要求你编写程序,将句中所有单词的顺序颠倒输出。 输入格式: 测试输入包含一个测试用例,在一行内给出总长度不超过500 000的字符串。字符串由若干单词和若干空格组成,其中单词是由英文字母(大小写有区分)组成的字符串,单词之间用若干个空格分 阅读全文
posted @ 2018-08-06 20:43 lingr7 阅读(6172) 评论(2) 推荐(0) 编辑
摘要: A1058 A+B in Hogwarts (20)(20 分) If you are a fan of Harry Potter, you would know the world of magic has its own currency system as Hagrid explained i 阅读全文
posted @ 2018-07-30 22:52 lingr7 阅读(248) 评论(0) 推荐(0) 编辑
摘要: A1027 Colors in Mars (20)(20 分) People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is repre 阅读全文
posted @ 2018-07-30 22:41 lingr7 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1022 D进制的A+B (20)(20 分) 输入两个非负10进制整数A和B( int main() { int a, b, d; scanf("%d%d%d", &a, &b, &d); int sum = a + b; int ans[31], num = 0; do { ans[num++] 阅读全文
posted @ 2018-07-30 22:07 lingr7 阅读(647) 评论(0) 推荐(0) 编辑
摘要: 3.4日期处理 http://www.codeup.cn/problem.php?cid=100000578&pid=0 c include int month[13][2] = { // 平年和闰年的每个月的天数 {0,0}, {31,31}, {28,29}, {31,31}, {30,30}, 阅读全文
posted @ 2018-07-30 21:49 lingr7 阅读(112) 评论(0) 推荐(0) 编辑
摘要: A1031 Hello World for U (20)(20 分) Given any string of N ( =5) characters, you are asked to form the characters into the shape of U. For example, "hel 阅读全文
posted @ 2018-07-30 21:11 lingr7 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 1032 挖掘机技术哪家强(20)(20 分) 为了用事实说明挖掘机技术到底哪家强,PAT组织了一场挖掘机技能大赛。现请你根据比赛结果统计出技术最强的那个学校。 输入格式: 输入在第1行给出不超过10^5^的正整数N,即参赛人数。随后N行,每行给出一位参赛者的信息和成绩,包括其所代表的学校的编号(从 阅读全文
posted @ 2018-07-30 16:56 lingr7 阅读(171) 评论(0) 推荐(1) 编辑
摘要: 1028 人口普查(20)(20 分) 某城镇进行人口普查,得到了全体居民的生日。现请你写个程序,找出镇上最年长和最年轻的人。 这里确保每个输入的日期都是合法的,但不一定是合理的——假设已知镇上没有超过200岁的老人,而今天是2014年9月6日,所以超过200岁的生日和未出生的生日都是不合理的,应该 阅读全文
posted @ 2018-07-30 16:31 lingr7 阅读(355) 评论(2) 推荐(0) 编辑