随笔分类 -  0J---PAT

摘要:输入两个非负 10 进制整数 A 和 B (≤),输出 A+B 的 D (1)进制数。 输入格式: 输入在一行中依次给出 3 个整数 A、B 和 D。 输出格式: 输出 A+B 的 D 进制数。 输入样例: 输出样例: 阅读全文
posted @ 2019-07-14 16:37 wydxry 阅读(232) 评论(0) 推荐(0)
摘要:Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to si 阅读全文
posted @ 2019-07-12 07:53 wydxry 阅读(273) 评论(0) 推荐(0)
摘要:This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Inp 阅读全文
posted @ 2019-07-11 21:33 wydxry 阅读(248) 评论(0) 推荐(0)
摘要:Excel can sort records according to any column. Now you are supposed to imitate this function. Input Specification: Each input file contains one test 阅读全文
posted @ 2019-07-11 21:11 wydxry 阅读(211) 评论(0) 推荐(0)
摘要: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 @ 2019-07-09 21:32 wydxry 阅读(251) 评论(0) 推荐(0)
摘要:A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
posted @ 2019-07-09 16:55 wydxry 阅读(206) 评论(0) 推荐(0)
摘要:Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For example, 123 and 51 are fri 阅读全文
posted @ 2019-07-09 11:10 wydxry 阅读(186) 评论(0) 推荐(0)
摘要:本题要求实现一个函数,判断任一给定整数N是否满足条件:它是完全平方数,又至少有两位数字相同,如144、676等。 函数接口定义: 其中N是用户传入的参数。如果N满足条件,则该函数必须返回1,否则返回0。 裁判测试程序样例: 输入样例: 输出样例: 阅读全文
posted @ 2019-06-26 10:46 wydxry 阅读(557) 评论(0) 推荐(0)
摘要: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-06-23 19:13 wydxry 阅读(254) 评论(0) 推荐(0)
摘要:给定数字 0-9 各若干个。你可以以任意顺序排列这些数字,但必须全部使用。目标是使得最后得到的数尽可能小(注意 0 不能做首位)。例如:给定两个 0,两个 1,三个 5,一个 8,我们得到的最小的数就是 10015558。 现给定数字,请编写程序输出能够组成的最小的数。 输入格式: 输入在一行中给出 阅读全文
posted @ 2019-06-22 16:51 wydxry 阅读(232) 评论(0) 推荐(0)
摘要:本题要求实现一个打印非负整数阶乘的函数。 函数接口定义: 其中N是用户传入的参数,其值不超过1000。如果N是非负整数,则该函数必须在一行中打印出N!的值,否则打印“Invalid input”。 裁判测试程序样例: 输入样例: 输出样例: 阅读全文
posted @ 2019-06-22 15:56 wydxry 阅读(1582) 评论(0) 推荐(0)
摘要:A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re 阅读全文
posted @ 2019-06-21 17:06 wydxry 阅读(237) 评论(0) 推荐(0)
摘要:给定一个 k 位整数 1 (0, ,, d​k−1​​>0),请编写程序统计每种不同的个位数字出现的次数。例如:给定 0,则有 2 个 0,3 个 1,和 1 个 3。 输入格式: 每个输入包含 1 个测试用例,即一个不超过 1000 位的正整数 N。 输出格式: 对 N 中每一种不同的个位数字,以 阅读全文
posted @ 2019-06-21 16:48 wydxry 阅读(247) 评论(0) 推荐(0)
摘要:People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, wher 阅读全文
posted @ 2019-06-21 16:41 wydxry 阅读(252) 评论(0) 推荐(0)
摘要:Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color 阅读全文
posted @ 2019-06-21 15:55 wydxry 阅读(194) 评论(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 @ 2019-06-19 18:55 wydxry 阅读(217) 评论(0) 推荐(0)
摘要:At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door 阅读全文
posted @ 2019-06-19 18:37 wydxry 阅读(162) 评论(0) 推荐(0)
摘要:With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing ba 阅读全文
posted @ 2019-06-19 18:18 wydxry 阅读(218) 评论(0) 推荐(0)
摘要:The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elev 阅读全文
posted @ 2019-06-19 18:07 wydxry 阅读(322) 评论(0) 推荐(0)
摘要:题目链接:https://pintia.cn/problem-sets/994805260223102976/problems/994805316250615808 阅读全文
posted @ 2019-04-25 20:45 wydxry 阅读(268) 评论(0) 推荐(0)

Live2D