码迷,mamicode.com
首页 >  
搜索关键字:numbers range    ( 16974个结果
leetcode-785-判断二分图
题目描述: 第一次提交:通过76/78 留坑 class Solution: def isBipartite(self, graph: List[List[int]]) -> bool: dic = {} l = [] for i in range(len(graph)): if graph[i] ...
分类:其他好文   时间:2020-07-17 14:14:05    阅读次数:61
leetcode148two-sum
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n ...
分类:其他好文   时间:2020-07-17 13:33:50    阅读次数:46
java.sql.SQLException: Column index out of range.
public <E> List<E> selectList(Mapper mapper, Connection conn){ PreparedStatement pstm = null; ResultSet rs = null; try{ String queryString = mapper.ge ...
分类:数据库   时间:2020-07-17 11:34:51    阅读次数:97
Python生成连续数字的多种方式
range()函数 range(101):可以用来产生0到100范围的整数,需要注意的是取不到101。 range(1, 101):可以用来产生1到100范围的整数,相当于前面是闭区间后面是开区间。 range(1, 101, 2):可以用来产生1到100的奇数,其中2是步长,即每次数值递增的值。 ...
分类:编程语言   时间:2020-07-17 11:22:42    阅读次数:287
条件语句和循环语句
#打印九九乘法表#-*- coding :UTF-8 -*-#打印九九乘法表for i in range(1,10): for j in range(1,i+1): ##打印语句中,大括号及其里面的字符(称作格式化字段)将会被被 .format() 中的参数替换,注意有个点的 print('{}x{ ...
分类:其他好文   时间:2020-07-16 21:49:17    阅读次数:67
可迭代对象、迭代器和生成器
一、可迭代对象(iterable) 我们知道,在Python世界里,一切皆对象。对象根据定义的维度,又可以分为各种不同的类型,比如:文件对象,字符串对象,列表对象。。。等等。 那什么对象才能叫做可迭代对象呢?一句话:“实现了__inter__方法的对象就叫做可迭代对象”,__inter__方法的作用 ...
分类:其他好文   时间:2020-07-16 21:12:36    阅读次数:42
可迭代对象、迭代器和生成器
一、可迭代对象(iterable) 我们知道,在Python世界里,一切皆对象。对象根据定义的维度,又可以分为各种不同的类型,比如:文件对象,字符串对象,列表对象。。。等等。 那什么对象才能叫做可迭代对象呢?一句话:“实现了__inter__方法的对象就叫做可迭代对象”,__inter__方法的作用 ...
分类:其他好文   时间:2020-07-16 21:05:16    阅读次数:42
python打印爱心
print('\n'.join([''.join([('AndyLove'[(x-y)%8]if((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3<=0 else' ')for x in range(-30,30)])for y in range ...
分类:编程语言   时间:2020-07-16 12:22:02    阅读次数:61
477. Total Hamming Distance
The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total ...
分类:其他好文   时间:2020-07-16 12:06:09    阅读次数:75
【leetcode_easy_array】1380. Lucky Numbers in a Matrix
problem 1380. Lucky Numbers in a Matrix 在矩阵中,如果一个数既是它所在行的最小值,又是它所在列的最大值,则称这个数为幸运数。找到矩阵中所有的幸运数。 Constraints All elements in the matrix are distinct. so ...
分类:其他好文   时间:2020-07-16 00:15:33    阅读次数:72
16974条   上一页 1 ... 47 48 49 50 51 ... 1698 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!