码迷,mamicode.com
首页 >  
搜索关键字:numbers range    ( 16974个结果
Python第四天
列表的初识 2 索引值 切片 (步长)3 列表的增删改查 4列表的嵌套一定要会 5 range与for循环结合 1 列表的初识 字符串:只是存储少量的数据 ,字符串操作后的返回值都是字符串(单一) list=【 100,‘’Alex“,True,【1,2,3】 承载任意数据类型,存储大量的数据 Py ...
分类:编程语言   时间:2020-04-26 11:14:45    阅读次数:77
A and B CodeForces - 1278B math
You are given two integers aa and bb. You can perform a sequence of operations: during the first operation you choose one of these numbers and increas ...
分类:其他好文   时间:2020-04-26 10:35:56    阅读次数:78
循环、枚举、条件判断、冒泡排序
循环 for 循环:循环特定范围内的值,例: for i in range(10): #range(10) 表示创建 0~10 的整数列表 print(i) range():一个函数,用于创建一个列表 while 循环:判断条件为 "真" 时循环,若条件一直为真则无限循环 n = 0 while n ...
分类:编程语言   时间:2020-04-26 01:35:12    阅读次数:91
【2020Python修炼记】python并发编程(五)多线程-应用部分
【目录】 一、 threading模块介绍 二 、开启线程的两种方式 三 、在一个进程下开启多个线程与在一个进程下开启多个子进程的区别 四、 线程相关的其他方法 五、守护线程 六、Python GIL(Global Interpreter Lock) 八、同步锁 九、死锁现象与递归锁 一、 thre ...
分类:编程语言   时间:2020-04-25 23:41:05    阅读次数:79
1113 Integer Set Partition
Given a set of N (>) positive integers, you are supposed to partition them into two disjoint sets A?1?? and A?2?? of n?1?? and n?2?? numbers, respecti ...
分类:其他好文   时间:2020-04-25 19:10:09    阅读次数:59
1483. 最高平均分
1483. 最高平均分 中文English 给出一组学生的名字以及他们的成绩,求最高的平均分(一位学生可能有多门课成绩) 样例 Example 1: Input:names = ["bob","ted","ted"] grades=[88,100,20] Output:88 Example 2: I ...
分类:其他好文   时间:2020-04-25 17:36:08    阅读次数:69
递推的基础
例1: def ditui(n,m,cx,cy): x=[1,1,2,2,-1,-1,-2,-2] y=[2,-2,1,-1,2,-2,1,-1] d=[[0 for i in range(n+1)]for j in range(m+1)] f=[[0 for i in range(n+1)]for ...
分类:其他好文   时间:2020-04-25 17:33:31    阅读次数:69
九九乘法口诀表
代码 # for循环 for i in range(1,10): for j in range(1,i+1): print('{}*{}={}\t'.format(i,j,i*j),end = ' ') print('\n') for i in range(1,10): for j in range ...
分类:其他好文   时间:2020-04-25 16:59:36    阅读次数:80
题解【POJ2376】Cleaning Shifts
"题面" 题意简述: 有 $m$ 个区间,每一段区间为 $[L_i,R_i]$,现在有一个长度为 $n$ 的线段,问最少选择多少个区间,才能够覆盖整个线段。 $\texttt{Data Range: }1\leq m \leq 2.5\times 10^4,\ 1\leq n \leq 10^6$。 ...
分类:其他好文   时间:2020-04-25 13:06:33    阅读次数:42
D - Sum of Large Numbers
Time Limit: 2 sec / Memory Limit: 1024 MB Score : 400 points ps:我发现一个很有趣的问题,long long和int 一起使用时,数据过大可能会出现错误,比如下面。所以最好还是统一用long long。 Problem Statement ...
分类:其他好文   时间:2020-04-25 12:36:28    阅读次数:66
16974条   上一页 1 ... 96 97 98 99 100 ... 1698 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!