执行如下程序报错 pytest.ini 文件不是GBK格式,更改格式 ...
分类:
编程语言 时间:
2019-01-08 15:31:26
阅读次数:
566
There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it ...
分类:
其他好文 时间:
2019-01-07 20:52:02
阅读次数:
192
E. Intersection of Permutations You are given two permutations a and b, both consisting of n elements. Permutation of nn elements is such a integer se ...
分类:
其他好文 时间:
2019-01-07 17:24:56
阅读次数:
157
题目一 解析 首先Promise新建后立即执行,所以会先输出1,2,而Promise.then()内部的代码在当次事件循环的结尾立即执行,所以会先输出4,最后输出3. 答案:1 2 4 3 题目二 解析 resolve函数Promise对象的状态从“未完成”变为“成功”(即从pending变为res ...
分类:
其他好文 时间:
2019-01-04 23:35:28
阅读次数:
320
题目描述:找出所有和为S的连续正数序列 思路分析:(一)求出连续序列的中间值和长度。 因为是连续正数序列,所以实质上是一个公差为1的等差数列,可以利用等差数列的和来计算。 假设长度为n (1)先算出中间值S/n,但要分以下两种情况: 当n为奇数时,序列的中间值正好是序列的平均值; 当n为偶数时,序列 ...
分类:
其他好文 时间:
2019-01-04 21:34:00
阅读次数:
188
前言: 1.from collections import namedtuple 适用地方: 学生信息系统: (名字,年龄,性别,邮箱地址)为了减少存储开支,每个学生的信息都以一个元组形式存放 如: ('tom', 18,'male','tom@qq.com' ) ('jom', 18,'mal', ...
分类:
编程语言 时间:
2019-01-04 17:11:27
阅读次数:
222
"传送门" 数列的特征方程和特征根老师上课好像讲过然而我没听……以后老师上数学课要认真听了QAQ 设$x=\frac{1+\sqrt{5}}{2},y=\frac{1 \sqrt{5}}{2}$,那么$x,y$是$t^2=t+1$的两个解,也就是数列$F_n=F_{n 1}+F_{n 2}$的特征根 ...
分类:
其他好文 时间:
2019-01-04 14:56:41
阅读次数:
100
在公司用golang 写了个插入外链数据的服务,这服务是2016年写的,大概作用就是,python 爬取的数据,要同步到 wordpress中,golang就负责,将数据整理,图片下载弄到 wordpress中,当然也不止这些服务,本来这个服务之前运行的好好的,可是最近又上了新的数据采集道后,这个服 ...
分类:
数据库 时间:
2019-01-03 19:40:39
阅读次数:
177
DZY has a sequence a, consisting of n integers. We'll call a sequence ai,?ai?+?1,?...,?aj (1?≤?i?≤?j?≤?n) a subsegment of the sequence a. The value (j ...
分类:
其他好文 时间:
2019-01-03 17:28:29
阅读次数:
193
Second Order Statistics (CF22A) 题解 这是一道CF的题目(Code Forces 22A) 题目(英文): Once Bob needed to find the second order statistics of a sequence of integer num ...
分类:
其他好文 时间:
2019-01-02 20:44:42
阅读次数:
165