![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT
Bpazy
部分博客会更新在:https://github.com/Bpazy/blog/issues
展开
-
1065. A+B and C (64bit) (20)
Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number of test cases, T (<=10). Then T test c原创 2016-11-03 17:25:53 · 244 阅读 · 0 评论 -
1050. String Subtraction (20)
Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 - S2 for any given strings. However, it原创 2016-11-02 14:32:00 · 246 阅读 · 0 评论 -
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 i原创 2016-11-02 14:14:54 · 237 阅读 · 0 评论 -
1046. Shortest Distance (20)
The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file contains o原创 2016-10-31 16:22:55 · 234 阅读 · 0 评论 -
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 Earch is called “jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec” on Mars, res原创 2016-11-11 15:45:08 · 262 阅读 · 0 评论 -
1041. Be Unique (20)
Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 104]. The first one who bets on a原创 2016-10-31 11:50:15 · 215 阅读 · 0 评论 -
A除以B
本题要求计算A/B,其中A是不超过1000位的正整数,B是1位正整数。你需要输出商数Q和余数R,使得A = B * Q + R成立。 输入描述: 输入在1行中依次给出A和B,中间以1空格分隔。输出描述: 在1行中依次输出Q和R,中间以1空格分隔。输入例子: 123456789050987654321 7输出例子: 17636684150141093474 3import原创 2016-10-08 18:05:32 · 304 阅读 · 0 评论 -
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 digi原创 2016-10-30 23:04:56 · 182 阅读 · 0 评论 -
1019. General Palindromic Number (20)
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. All single digit numbers are palindromic numbers.原创 2016-10-30 16:18:08 · 206 阅读 · 0 评论 -
第一个坑的我崩溃的题目:福尔摩斯的约会
题目描述 大侦探福尔摩斯接到一张奇怪的字条:“我们约会吧! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm”。 大侦探很快就明白了,字条上奇怪的乱码实际上就是约会的时间“星期四 14:04”,因为前面两字符串中第1对相同的大写英文字母(大小写有区分)是第4个字母’D’,代表星期四;第2对相同的字符是’E’,那是第5个英文字母,代表原创 2016-10-08 11:24:08 · 498 阅读 · 1 评论 -
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 seco原创 2016-10-30 11:35:41 · 165 阅读 · 0 评论 -
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 cas原创 2016-10-29 20:13:47 · 176 阅读 · 0 评论 -
1002. A+B for Polynomials
This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial原创 2016-10-29 19:51:23 · 266 阅读 · 0 评论 -
1061. Dating (20)
Sherlock Holmes received a note with some strange strings: “Let’s date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm”. It took him only a minute to figure out that those strange strings are ac原创 2016-11-05 20:00:21 · 233 阅读 · 0 评论 -
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原创 2016-11-04 11:31:32 · 247 阅读 · 0 评论 -
1058. A+B in Hogwarts (20)
If you are a fan of Harry Potter, you would know the world of magic has its own currency system – as Hagrid explained it to Harry, “Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a Sick原创 2016-11-04 00:19:14 · 237 阅读 · 0 评论 -
1054. The Dominant Color (20)
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 with the largest proportional area is called the do原创 2016-11-02 15:44:04 · 201 阅读 · 0 评论