![](https://img-blog.csdnimg.cn/20190927151026427.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
PAT
文章平均质量分 69
PAT
Kinght_123
大家好,我是Kinght_123,欢迎大家关注!
展开
-
PAT 1100 Mars Numbers (20 分)————Python
1100 Mars Numbers (20 分)People on Mars count their numbers with base 13:Zero on Earth is called “tret” on Mars.The numbers 1 to 12 on Earth is called “jan, feb, mar, apr, may, jun,jly, aug, sep, oct, nov, dec” on Mars, respectively.For the next highe原创 2021-02-22 10:51:28 · 213 阅读 · 4 评论 -
PAT 1016 部分A+B (15 分)————Python
1016 部分A+B (15 分)输入格式:输出格式:输入样例 1:3862767 6 13530293 3输出样例 1:399输入样例 2:3862767 1 13530293 8输出样例 2:0作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:150 ms内存限制:64 MBCodels = list(map(int,input().split(' ')))l1,l2 = [],[]for i in str(ls[原创 2021-02-21 12:58:11 · 298 阅读 · 2 评论 -
PAT 1017 A除以B (20 分)————Python
1017 A除以B (20 分)本题要求计算 A/B,其中 A 是不超过 1000 位的正整数,B 是 1 位正整数。你需要输出商数 Q 和余数 R,使得 A=B×Q+R 成立。输入格式:输入在一行中依次给出 A 和 B,中间以 1 空格分隔。输出格式:在一行中依次输出 Q 和 R,中间以 1 空格分隔。输入样例:123456789050987654321 7输出样例:17636684150141093474 3作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB原创 2021-02-21 12:31:22 · 231 阅读 · 4 评论 -
PAT 1042 Shuffling Machine (20 分)————Python
1042 Shuffling Machine (20 分)Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid “inside jobs” where employees collaborate with gamblers by performing inadequate原创 2021-02-21 12:09:08 · 192 阅读 · 1 评论 -
PAT 1031 Hello World for U (20 分)————Python
1031 Hello World for U (20 分)1031 Hello World for U (20 分)Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as:h de ll rlowoInput Specification:Each input f原创 2021-02-20 11:06:44 · 208 阅读 · 2 评论 -
PAT 1035 Password (20 分)————Python
1035 Password (20 分)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 since it is hard to distinguish 1 (one) from l (L in lowercase), or 0 (zero) from O (原创 2021-02-19 11:47:10 · 312 阅读 · 0 评论 -
PAT 1023 Have Fun with Numbers (20 分)————Python
1023 Have Fun with Numbers (20 分)Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number consisting exactly the nu原创 2021-02-19 11:11:50 · 217 阅读 · 0 评论 -
PAT 1027 Colors in Mars (20 分)————Python
1027 Colors in Mars (20 分)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, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2原创 2021-02-18 16:39:54 · 181 阅读 · 0 评论 -
PAT 1019 General Palindromic Number (20 分)————Python
1019 General Palindromic Number (20 分)Input Specification:Output Specification:Sample Input 1:27 2Sample Output 1:Yes1 1 0 1 1Sample Input 2:121 5Sample Output 2:No4 4 1作者:CHEN, Yue单位:浙江大学代码长度限制:16 KB时间限制:400 ms内存限制:64 MBCoded原创 2021-02-17 12:47:07 · 338 阅读 · 9 评论 -
PAT 1015 Reversible Primes (20 分)————Python
题目1015 Reversible Primes (20 分)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 reversible prime because its reverse 37 is also a prime.Now given any two原创 2021-02-17 11:27:02 · 382 阅读 · 8 评论 -
PAT 1011 World Cup Betting (20 分)————Python
1011 World Cup Betting (20 分)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 battles for the World Cup trophy in South Africa. Similarly, football betting原创 2021-02-16 20:14:19 · 1226 阅读 · 2 评论 -
PAT 1008 Elevator (20 分)————Python
1008 Elevator (20 分)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 elevator will stop, in specified order. It costs 6 seconds to move the elevator up one fl原创 2021-02-15 11:19:08 · 516 阅读 · 2 评论 -
PAT 1005 Spell It Right (20 分)————Python
1005 Spell It Right (20 分)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 Specification:Each input file contains one test case. Each case occupies one line which原创 2021-02-15 11:00:52 · 208 阅读 · 0 评论 -
PAT 1034 Head of a Gang (30 分)————Python
1034 Head of a Gang (30 分)One way that the police finds the head of a gang is to check people’s phone calls. If there is a phone call between A and B, we say that A and B is related. The weight of a relation is defined to be the total time length of all t原创 2021-02-14 19:22:50 · 331 阅读 · 7 评论 -
PAT 1001 A+B Format python解法
题目1001 A+B Format (20 分)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 than four digits).Input Specification:Each input file contains one test case. Each原创 2021-02-09 12:40:00 · 295 阅读 · 1 评论