C语言 使用long类型: #include "math.h" int reverse(int x){ int max = pow(2,31)-1; int min = pow(2,31)*-1; long n=0; while (x!=0){ n = n*10 + x%10; x = x/10; ...
分类:
编程语言 时间:
2021-05-23 23:09:40
阅读次数:
0
# for双循环,内层循环先循环,外层循环再循环for i in range(1,4): for j in range(1,3): print('i=',i,' ','j=',j)执行结果: # for 双层循环关联for i in range(1,4): for j in range(1,i+1) ...
分类:
编程语言 时间:
2021-05-23 23:06:26
阅读次数:
0
tqdm 是一个快速,可扩展的Python进度条 可以在 Python 长循环中添加一个进度提示信息,用户只需要封装任意的迭代器 tqdm(iterator)。 使用pip就可以安装。 ' from tqdm import tqdm for i in tqdm(range(1000)): #do s ...
分类:
编程语言 时间:
2021-05-23 23:00:33
阅读次数:
0
ssh基于key验证 1,在客户端生成公钥私钥对并将公钥拷到要连接的服务器上,验证是否成功 [root@localhost ~]# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the k ...
分类:
其他好文 时间:
2021-05-23 22:59:40
阅读次数:
0
红色方框要引入箭头里面的 import sys sys.path.append('../../config/') from database import * print(MYSQL_CONFIG) ...
分类:
编程语言 时间:
2021-05-20 17:53:11
阅读次数:
0
官网下载Jenkins https://www.jenkins.io/zh/download/ 构建jenkins镜像 # docker build -t jenkins:2.277.3 . from ubuntu:latest run sed -i 's/ports.ubuntu.com/mirr ...
分类:
其他好文 时间:
2021-05-04 16:25:44
阅读次数:
0
原代码: list= [1,2,3,4]list= list.append(5)print(list)输出: None问题分析append使用注意事项:append方法只是在恰当的位置修改原来的列表!也就是说,不是返回一个列表,而只是修改原来的列表,所以如果用 等式 输出的话,返回是None 。去掉 ...
分类:
移动开发 时间:
2021-05-04 16:15:10
阅读次数:
0
1、整数规划问题 整数规划问题在工业、经济、国防、医疗等各行各业应用十分广泛,是指规划中的变量(全部或部分)限制为整数,属于离散优化问题(Discrete Optimization)。 线性规划问题的最优解可能是分数或小数。但很多实际问题常常要求某些变量必须是整数解,例如:机器的台数、工作的人数或装 ...
分类:
编程语言 时间:
2021-05-04 16:14:02
阅读次数:
0
# 闭包 def outer(x): print('outer:',x) def inner(): print('inner:', x) return inner # 外部函数return的一定是内部函数的函数名 def a(x): print('a:',x) def b(y): print('b: ...
分类:
编程语言 时间:
2021-05-04 16:12:49
阅读次数:
0
Course Schedule III (H) There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [durationi, lastD ...
分类:
其他好文 时间:
2021-05-04 16:09:30
阅读次数:
0