摘要: 对象的种类 Beautiful Soup将复杂HTML文档转换成一个复杂的树形结构,每个节点都是Python对象,所有对象可以归纳为4种: Tag , NavigableString , BeautifulSoup , Comment 。 Tag Tag对象与XML或者HTML原生文档中的tag相同 阅读全文
posted @ 2017-06-16 00:59 limyel 阅读(251) 评论(0) 推荐(0) 编辑
摘要: CREATE DATABASE <数据库名字>; 新建数据库 SHOW DATABASES; 查看所有数据库 USE <数据库名字> 连接数据库 SHOW TABLES; 查看当前数据库有多少表 CREATE TABLE 表的名字 新建表 ( 列名a 数据类型(数据长度), 列名b 数据类型(数据长 阅读全文
posted @ 2017-06-15 22:14 limyel 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). Input Input consists of a sequence of lin 阅读全文
posted @ 2017-04-12 22:32 limyel 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Descripe Given a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k same characters shou 阅读全文
posted @ 2017-04-10 23:14 limyel 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in th 阅读全文
posted @ 2017-04-10 21:08 limyel 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Description Given two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.This p 阅读全文
posted @ 2017-04-10 14:52 limyel 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in 阅读全文
posted @ 2017-04-08 22:04 limyel 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Description In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, 阅读全文
posted @ 2017-04-08 13:36 limyel 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that d 阅读全文
posted @ 2017-04-07 19:51 limyel 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Description 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 flo 阅读全文
posted @ 2017-04-06 22:22 limyel 阅读(142) 评论(0) 推荐(0) 编辑