码迷,mamicode.com
首页 >  
搜索关键字:for while until    ( 29426个结果
C语言实现简易扫雷
C语言实现简易扫雷
分类:编程语言   时间:2020-08-15 22:38:57    阅读次数:78
retry until
do.sh #!/bin/bash repeat() { while :; do $@ && return; sleep 1; done } retryuntil() { echo $(date +%F%n%T) msg=`./job.sh 2>&1` echo $msg #echo "$msg" ...
分类:其他好文   时间:2020-08-13 22:08:35    阅读次数:50
计蒜客 T1725 国王的魔镜
首先取出这个项链的长度x,如果他是回文数的话让项链减去一半,x减去一半,如果他不是回文数,就退出循环 上代码: #include <iostream>#include <cstdio>#include <cmath>#include <cstring>#include <algorithm>#inc ...
分类:其他好文   时间:2020-08-13 12:13:39    阅读次数:53
Leetcode202 快乐数 佛洛依德循环
JAVA: public final boolean isHappy(int n) { int next = next(n); while (n != 1 && n != next) { n = next(n); next = next(next(next)); } return n == 1; } ...
分类:其他好文   时间:2020-08-12 15:41:43    阅读次数:51
2020/8/11
变量: 系统变量:全局变量、会话变量 自定义变量:用户变量、局部变量 一、系统变量 说明:变量由系统提供,不是用户定义,属于服务器层面 语法 1、查看所有的系统变量 show global | [session] variables; 2、查看满足条件的部分系统变量 show global |【se ...
分类:其他好文   时间:2020-08-12 14:04:56    阅读次数:74
skynet源码学习(一) linux无锁化编程
以下是skynet源码:structgroupnode{inthandle;structskynetcontextctx;structgroupnodenext;};structgroup{intlock;structgroupnodenode[HASHSIZE];};structgroupG=NULL;inlinestaticvoidlock(structgroupg){while(synclo
分类:Web程序   时间:2020-08-11 17:32:26    阅读次数:90
Leetcode.76 Minimum Window Substring (Java)
Leetcode.76 Minimum Window Substring Given a string S and a string T, find the minimum window in S which will contain all the characters in T in compl ...
分类:编程语言   时间:2020-08-11 15:56:40    阅读次数:64
for循环
package com.xuyifan.struct; /** * @author xyf * @create 2020-08-11-11:08 */ /** for循环最先执行初始化步骤,可以声明一种类型,但是可以初始化一个或多个初始化变量 也可以是空语句 检测布尔表达式的值,如果为true,则循 ...
分类:其他好文   时间:2020-08-11 13:06:35    阅读次数:82
CodeForces 1327F AND Segments
题意 给三个整数 \(n,k,m\) 和 \(m\) 个限制 \((l_i,r_i,x_i)\),求有多少个长度为 \(n\) 的序列 \(a\) 满足: 对于 $1\leq i\leq n$ 有 $0\leq a_i<2^k$ 对于 $1\leq i\leq m$ 有 \(a_{l_i} \ope ...
分类:其他好文   时间:2020-08-10 14:31:19    阅读次数:64
790. 数的三次方根
#include<iostream> #include<cstdio> using namespace std; int main(){ double n; cin >> n; double l = -10000, r = 10000; while(r - l > 1e-8){ // 由于要保留6位 ...
分类:其他好文   时间:2020-08-10 13:11:59    阅读次数:62
29426条   上一页 1 ... 70 71 72 73 74 ... 2943 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!