码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
python3之流程控制
一、流程控制 Python支持两种基本流程控制结构 分支结构: 根据条件选择不同的代码块执行 循环结构: 根据循环条件重复代码块 if语句用于分支结构 for-in, while用于循环结构 break, continue用于循环控制 二 、分支结构 1 if条件判断 格式 基本格式 if cond ...
分类:编程语言   时间:2021-02-15 11:55:35    阅读次数:0
1481F.AB Tree(树上信息统计+01背包+记录DP路径+Bitset优化时间复杂度)
#include<bits/stdc++.h> using namespace std; const int maxn=1e5+100; const int inf=1e9; int n,m,x; int dep[maxn];//节点在第几层 int num[maxn];//每一层的节点个数 int ...
分类:其他好文   时间:2021-02-15 11:49:10    阅读次数:0
力扣228. 汇总区间
原题 1 class Solution: 2 def summaryRanges(self, nums: List[int]) -> List[str]: 3 left,right,lens,ans = 0,0,len(nums),[] 4 while left < lens: 5 right = ...
分类:其他好文   时间:2021-02-15 11:47:09    阅读次数:0
python 输出99乘法表
i = 1while i <= 9: i += 1 j = 1 while j <= i-1: print("{}*{}=".format(j,i-1),j*(i-1),sep='',end=' ') j += 1 print('') for i in range(1,10): for y in r ...
分类:编程语言   时间:2021-02-10 13:39:52    阅读次数:0
gem install rjb (1.6.4) error
An error occurred while installing rjb (1.6.4), and Bundler cannot continue. Make sure that `gem install rjb -v '1.6.4' --source 'https://gems.ruby-ch ...
分类:其他好文   时间:2021-02-10 13:00:46    阅读次数:0
整数拆分
此博客链接:https://www.cnblogs.com/ping2yingshi/p/14391627.html 整数拆分 题目链接:https://leetcode-cn.com/problems/integer-break/ 题目 给定一个正整数 n,将其拆分为至少两个正整数的和,并使这些整 ...
分类:其他好文   时间:2021-02-09 12:30:48    阅读次数:0
equals和hashCode详解
equals和hashCode详解 http://www.cnblogs.com/Qian123/p/5703507.html 阅读目录 equals()方法详解 hashcode() 方法详解 Hashset、Hashmap、Hashtable与hashcode()和equals()的密切关系 j ...
分类:其他好文   时间:2021-02-09 12:25:29    阅读次数:0
【Leetcode】剑指Offer 04二维数组的查找
题目描述: 在一个 n * m 的二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个高效的函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 示例: 现有矩阵 matrix 如下: [ [1, 4, 7, 11, 15], [2, 5, 8 ...
分类:编程语言   时间:2021-02-09 11:47:39    阅读次数:0
ArcPy函数-更新游标UpdateCursor
ArcGIS 帮助 10.2 摘要 UpdateCursor 函数创建一个用于更新或删除指定要素类、shapefile 和表中的行的游标。该游标将数据锁定保留至脚本完成或更新游标对象被删除时。 讨论 以迭代方式更新游标的方式有两种:for 循环或者 while 循环(通过游标的 next 方法返回下 ...
分类:其他好文   时间:2021-02-09 11:44:54    阅读次数:0
Saruman's Army
#include<cstdio> #include<iostream> #include<set> #include<algorithm> using namespace std; set<int> s; int main(void) { int R, n; while (cin >> R >> n ...
分类:其他好文   时间:2021-02-08 12:52:08    阅读次数:0
40024条   上一页 1 ... 47 48 49 50 51 ... 4003 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!