a_list = [ ('mac',9000), ('kindle',8000), ('tesla',6000), ('python book',105),]saving = input('输入你的钱:')shopping = []if saving.isdigit():#如果输入的为数字,转换为整 ...
分类:
其他好文 时间:
2020-07-16 11:52:13
阅读次数:
75
let = /\d{4}-\d{1,2}-\d{1,2}/g.exec( 输入需要去除时分秒的值 ) 在 input 中 填写 onkeyup="this.value=this.value.replace(/\D/g,'')" <input onkeyup="this.value=this.valu ...
分类:
其他好文 时间:
2020-07-15 23:33:23
阅读次数:
85
Description A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. ...
分类:
其他好文 时间:
2020-07-15 23:20:22
阅读次数:
96
一、必须遵守的四项原则 1:接口 方法名==xx.xml中的id名 2:方法返回值类型与Mapper.xml文件中返回值类型一致 3:方法的入参类型与Mapper.xml文件中入参值类型一致 4:命名空间绑定接口 二、 public class UserMapperTest { private Sq ...
分类:
移动开发 时间:
2020-07-15 01:06:05
阅读次数:
67
(熟练!重要!)二叉搜索树 BST ##题目大意 判断给定序列是否是一个BST或镜像BST树的先序遍历序列,如果是则输出该树的后序遍历序列。 ##思路 根据给定序列创建BST树,求出它的先序遍历和镜像树的先序遍历(即原树遍历时按照根->右->左),与原序列比较。 ##AC代码 #define _CR ...
分类:
其他好文 时间:
2020-07-14 11:52:38
阅读次数:
62
Number of Segments in a String (E) 题目 Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space ch ...
分类:
其他好文 时间:
2020-07-14 09:24:30
阅读次数:
84
动作 printf printf 可以实现格式化输出格式: printf “FORMAT”, item1, item2, ... 说明: 必须指定FORMAT 不会自动换行,需要显式给出换行控制符 \n FORMAT中需要分别为后面每个item指定格式符 格式符:与item一一对应 %c:显示字符的 ...
分类:
其他好文 时间:
2020-07-14 09:20:53
阅读次数:
73
添加删除记录(原生) 示例: /*style.css*/ @CHARSET "UTF-8"; #total { width: 450px; margin-left: auto; margin-right: auto; } ul { list-style-type: none; } li { bord ...
分类:
Web程序 时间:
2020-07-13 15:39:11
阅读次数:
71
(贪心、字符串) ##题目大意 给一些字符串,求它们拼接起来构成最小数字的方式 ##思路 贪心算法。用cmp排序,直接判断a+b和b+a的大小即可。 必须保证两个字符串构成的数字是最小的才行,所以cmp函数写成return a + b < b + a;的形式,保证它排列按照能够组成的最小数字的形式排 ...
分类:
其他好文 时间:
2020-07-13 14:04:47
阅读次数:
60
差了三天的题了,得赶紧补上 1 num,inx = input().split("E") 2 out = "" if num[0] == "+" else "-" #输出的正负号 3 a,de = num[1:].split(".") 4 num0 = a+de 5 num_ling = int(i ...
分类:
其他好文 时间:
2020-07-13 11:22:12
阅读次数:
66