1、 #include <stdio.h> int main(void) { int i; puts("please input an integer."); printf("i = "); scanf("%d", &i); while (i > 0) { putchar('*'); i = i - ...
分类:
编程语言 时间:
2021-01-07 12:38:31
阅读次数:
0
#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 a = 1 while a <= 6: print(a) a = a + 1 #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 a = 1 while a <= 6: a = a ...
分类:
编程语言 时间:
2021-01-07 12:09:58
阅读次数:
0
- name: 以轮询的方式等待服务同步完成 shell: "systemctl status etcd.service|grep Active" register: etcd_status until: '"running" in etcd_status.stdout' retries: 8 de ...
分类:
其他好文 时间:
2021-01-07 11:40:27
阅读次数:
0
题目:https://leetcode-cn.com/problems/longest-palindromic-substring/ 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000 我的是暴力解法,最终勉强通过了第一次答案: 通过遍历从头到尾的所有字符串来比较 ...
分类:
其他好文 时间:
2021-01-06 12:31:44
阅读次数:
0
题目 给你一个链表和一个特定值 x ,请你对链表进行分隔,使得所有小于 x 的节点都出现在大于或等于 x 的节点之前。 你应当保留两个分区中每个节点的初始相对位置。 示例: 输入:head = 1->4->3->2->5->2, x = 3 输出:1->2->2->4->3->5 思路 思路很简单, ...
分类:
其他好文 时间:
2021-01-06 12:15:51
阅读次数:
0
1.itertools Python的内建模块itertools提供了非常有用的用于操作迭代对象的函数。 首先,我们看看itertools提供的几个“无限”迭代器: >>> import itertools >>> natuals = itertools.count(1) >>> for n in ...
分类:
编程语言 时间:
2021-01-06 12:07:57
阅读次数:
0
描述现象 用pyinstaller打包了一个上传文件的脚本,里面有多个input在while循环内,然后启用了多线程上传,在编辑器中运行没问题,但是打包完后,就一直循环提示你input... 解决 在google了一段时间后,发现需要在执行入口之前调用 multiprocessing.freeze_ ...
分类:
编程语言 时间:
2021-01-06 11:56:17
阅读次数:
0
1 #define IO std::ios::sync_with_stdio(0) 2 #include <bits/stdc++.h> 3 using namespace std; 4 #define mk make_pair 5 #define pb push_back 6 const int ...
分类:
其他好文 时间:
2021-01-06 11:49:40
阅读次数:
0
题干 给你一个整数 n ,表示比赛中的队伍数。比赛遵循一种独特的赛制: 如果当前队伍数是 偶数 ,那么每支队伍都会与另一支队伍配对。总共进行 n / 2 场比赛,且产生 n / 2 支队伍进入下一轮。 如果当前队伍数为 奇数 ,那么将会随机轮空并晋级一支队伍,其余的队伍配对。总共进行 (n - 1) ...
分类:
其他好文 时间:
2021-01-05 11:41:42
阅读次数:
0
#include<iostream> #include<vector> using namespace std; vector<char>post,in; vector<char>level(100000,-1); in N; void ergodic(int root,int start,int ...
分类:
编程语言 时间:
2021-01-05 11:40:19
阅读次数:
0