这是一个第三方库,可以处理xlsx格式的Excel文件。pip install openpyxl安装。如果使用Aanconda,应该自带了。 读取Excel文件 需要导入相关函数。 1 from openpyxl import load_workbook 2 3 # 默认可读写,若有需要可以指定wr ...
分类:
编程语言 时间:
2020-04-18 18:34:24
阅读次数:
58
Problem : You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can ...
分类:
其他好文 时间:
2020-04-18 10:09:19
阅读次数:
67
说明 从本质上来讲,fold方法读取一种数据,然后返回给你另外一种。 fold和foldLeft和foldRight做的事同样的事情,仅有一点点不同。 fold val numbers = List(1, 2, 3, 4, 5) val res = numbers.fold(10) { (z, i)... ...
分类:
其他好文 时间:
2020-04-18 09:32:45
阅读次数:
47
给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。 您可以假设除了数字 0 之外,这两个数都不会以 0 开头。 来源:力扣(LeetCode)链接: ...
分类:
其他好文 时间:
2020-04-18 09:27:22
阅读次数:
62
"CodeForces 55D Beautiful numbers" 一句话题意:有T组询问,每次询问区间[l, r]中的beautiful number有多少。beautiful number是指这个数可以被组成它的数字整除。例如15是beautiful number,因为15可以被1整除,也可以 ...
分类:
其他好文 时间:
2020-04-17 18:39:23
阅读次数:
57
Problem : Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one c ...
分类:
其他好文 时间:
2020-04-17 00:23:13
阅读次数:
77
You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' ...
分类:
其他好文 时间:
2020-04-15 15:17:52
阅读次数:
68
[TOC] 22、python生成随机数:uniform(), randint(), gauss(), expovariate() 22.1 模块: 内建模块,伪随机数生成器 使用Mersenne Twister的伪随机数生成器PRNG进行生成,它以一个确定的数字作为属于,并为其生成一个随机数;为了 ...
分类:
编程语言 时间:
2020-04-15 12:23:32
阅读次数:
65
很多人不喜欢√2的表达,他们认为它不是一个数。 一、卡塔兰数 Catalan numbers 在数方面上,有个著名的数叫卡塔兰数 Catalan numbers,它是组合数学中一个常在各种计数问题中出现的数列。其中它能解决一个叫求括号化方案数量的问题。如图下: 在卡塔兰数下,设P为平衡的父字符串集。 ...
分类:
其他好文 时间:
2020-04-14 23:01:56
阅读次数:
126
String[] str = {"aa","kser","bdf","ope","aa"}; String[] str2 = str.Distinct().ToArray(); ...
分类:
编程语言 时间:
2020-04-14 22:35:46
阅读次数:
50