自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 问答 (1)
  • 收藏
  • 关注

原创 Python依据单个关键词爬取百度图片

最近由于工作需要要使用大量的水果蔬菜图片,故萌生使用爬虫抓取百度图片的想法,并未用于商业用途,只是为了测试数据。所以并未使用多线程、框架等技术。 由于百度图片是动态加载的,发现搜索关键词后action的参数很相似,故使用requests.get(url , params=)函数去获取内容。并正则提取到所有的图片链接,再将这些图片写入文件夹中。 开始和网上的资料中使用的获取json字符串,但是有些

2017-11-23 14:57:54 9362 1

原创 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

2017-10-18 21:07:09 230

原创 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

2017-10-15 22:39:59 178

原创 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 d e l l r lowo That is, the characters must be pri

2017-10-11 23:25:58 203

原创 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

2017-10-07 11:18:14 139

原创 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.

2017-10-05 11:05:09 193

原创 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 pri

2017-10-03 11:32:17 160

原创 1008 Elevator(20)

1008. Elevator (20)时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue The highest building in our city has only one elevator. A request list is made up with N positive number

2017-10-01 14:39:26 355

原创 Spell it Right(20) 1005

1005. Spell It Right (20)时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output

2017-09-30 10:48:04 160

原创 PAT A+B Fomat

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).InputEach inpu

2017-09-27 19:35:06 175

原创 PAT 1132 Cut Integer(20)

题目是真的不难,但是考试的时候不知道因为什么原因一直异常错误,回来重新敲了遍却通过了,心态爆炸。另一个误解的地方就是167334/(167*334)的结果正好是3,就一直以为这个也是条件,结果只要是可以整除就好了。新的c++有了to_string函数可以将整型数据转化为string,调用size方法可以更简洁。此外要注意就是除数为0的情况。样例输入: 3 167334 2333 1234567

2017-09-18 17:22:10 392

原创 Friend Numbers (20)

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 friend numbers since 1+2+3 = 5+1 = 6, and 6 is their f

2017-09-15 23:41:16 240

原创 Raffle for Weibo Followers

A. Raffle for Weibo Followers (20)John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on Weibo – that is, he would select winners from every N followers

2017-09-15 15:20:59 203

原创 PAT 甲级 Consecutive Factors (20)

PAT Test 甲级20分真题(一)

2017-09-13 21:12:42 266

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除