import numpy as np A = np.arange(14,2,-1).reshape((3,4)) #平均值 print(np.mean(A)) print(A.mean()) print(np.average(A)) #中位数 print(np.median(A)) #累加 prin... ...
分类:
其他好文 时间:
2018-12-08 14:42:26
阅读次数:
172
这是悦乐书的第 194 次更新,第 200 篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第56题(顺位题号是231)。给定一个整数,写一个函数来确定它是否是2的幂。例如: 输入:1 输出:true 说明:2^0 = 1 输入:16 输出:true 说明:2^4 = 1 ...
分类:
编程语言 时间:
2018-12-07 23:20:55
阅读次数:
164
题目传送门: "https://agc028.contest.atcoder.jp/tasks/agc028_a" 题目翻译 给你两个串$s$与$t$,长度分别为$n,m$。问你存不存在一个串长度为$l$,$l$是$n,m$的公倍数,并且满足下面的条件: $1$、对于第$1$位、第$l/n+1$位, ...
分类:
其他好文 时间:
2018-12-07 21:56:34
阅读次数:
204
1,标签跳转 <router-link to='two'><button>点我到第二个页面</button></router-link> 2,点击事件跳转 html : <button @click="hreftwo" class="test-one">点我到第二个页面</button> js : ...
分类:
其他好文 时间:
2018-12-07 20:57:15
阅读次数:
476
Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to h ...
分类:
其他好文 时间:
2018-12-05 23:21:52
阅读次数:
273
基本概念 Python支持可变参数,最简单的方法莫过于使用默认参数。 def test_defargs(one, two=2): # 参数one没有默认值,two的默认值为2 print('Required argument: ', one) print('Optional argument: ', ...
分类:
编程语言 时间:
2018-12-05 22:26:06
阅读次数:
258
恢复内容开始 CF1080C Masha and two friends (矩阵的重叠面积) 题目链接:CF1080C 有关在坐标轴内矩阵的重叠覆盖,格点计算都是毒瘤题,但见到了还是要A的 这类题目一般会有一些化繁为简的技巧 这道题,是有关黑白格点的计算,我们可以利用容斥来做 首先我们记 B(x_1 ...
分类:
其他好文 时间:
2018-12-05 21:54:48
阅读次数:
220
A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the ...
分类:
其他好文 时间:
2018-12-04 22:39:12
阅读次数:
196
Given two non negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: + The length of both num1 and num2 is =0; ...
分类:
其他好文 时间:
2018-12-04 22:38:04
阅读次数:
244
Given a non empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both ...
分类:
其他好文 时间:
2018-12-04 22:31:09
阅读次数:
195