PAT 1081.检查密码
题目本题要求你帮助某网站的用户注册模块写一个密码合法性检查的小功能。该网站要求用户设置的密码必须由不少于6个字符组成,并且只能有英文字母、数字和小数点”.”,还必须既有字母也有数字。输入格式:输入第一行给出一个正整数 N(<=100),随后 N 行,每行给出一个用户设置的密码,为不超过80个字 ...
Read more
PAT 1080.MOOC期终成绩
题目对于在中国大学MOOC(http://www.icourse163.org/)学习“数据结构”课程的学生,想要获得一张合格证书,必须首先获得不少于200分的在线编程作业分,然后总评获得不少于60分(满分100)。总评成绩的计算公式为 G = (G期中x 40% + G期末x 60%),如果 G期 ...
Read more
PAT 1069.The Black Hole of Numbers
题目For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-dec ...
Read more
PAT 1058.A+B in Hogwarts
题目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 ...
Read more
PAT 1054.The Dominant Color
题目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 colo ...
Read more
PAT 1050.String Subtraction
题目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 ...
Read more
PAT 1041.Be Unique
题目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 num ...
Read more
PAT 1035.Password
题目To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing password ...
Read more
PAT 1031.Hello World for U
题目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 ...
Read more
PAT 1027.Colors in Mars
题目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, wh ...
Read more