解法一:水平扫描 int indexOf(String str): 在字符串中检索str,返回其第一出现的位置,如果找不到则返回-1 class Solution { public String longestCommonPrefix(String[] strs) { if(strs.length ...
分类:
编程语言 时间:
2020-04-09 00:43:26
阅读次数:
70
n boys and m girls came to the party. Each boy presented each girl some integer number of sweets (possibly zero). All boys are numbered with integers ...
分类:
其他好文 时间:
2020-04-07 23:59:05
阅读次数:
142
Problem : Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the m ...
分类:
其他好文 时间:
2020-04-07 22:40:21
阅读次数:
74
<if test="parentId != null and parentId != ''"> AND bc.`parent_id` = #{parentId, jdbcType=VARCHAR} </if> <if test="deleteStatus != null"> AND bc.`dele ...
分类:
其他好文 时间:
2020-04-07 22:08:43
阅读次数:
76
Q:将给出的整数x翻转。 例1:x=123,返回321 例2:x= 123,返回 321 你有思考过下面的这些问题么? 如果整数的最后一位是0,那么输出应该是什么?比如10,100 你注意到翻转后的整数可能溢出吗?假设输入是32位整数,则将翻转10000000003就会溢出,你该怎么处理这样的样例? ...
分类:
其他好文 时间:
2020-04-07 12:38:57
阅读次数:
73
1.int() 向下取整 内置函数 2.round(x,n) 四舍五入 内置函数 n表示保留的小位数,默认取整 保留2位小数 3.floor() 向下取整 math模块函数 4.ceil() 向上取整 math模块函数 5.modf() math模块函数 分离整数和小数位,并分别返回 最后一个输出, ...
分类:
编程语言 时间:
2020-04-07 11:12:17
阅读次数:
111
import static java.lang.Integer.parseInt;class zhgetmuluhuoqu { //方法2:得到公网集合 public static ArrayList zhlist(String dirname, int yifeinum,int zhushinum ...
分类:
其他好文 时间:
2020-04-07 09:20:16
阅读次数:
52
训练赛上一题,当时没做出来,Orz太弱了 The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c ...
分类:
其他好文 时间:
2020-04-06 19:02:19
阅读次数:
77
PostgreSQL是一个强类型数据库,因此你输入的变量、常量是什么类型,是强绑定的,例如 在调用操作符时,需要通过操作符边上的数据类型,选择对应的操作符。 在调用函数时,需要根据输入的类型,选择对应的函数。 如果类型不匹配,就会报操作符不存在,或者函数不存在的错误。 postgres=# sele ...
分类:
数据库 时间:
2020-04-06 17:49:51
阅读次数:
464
Problem : Reverse bits of a given 32 bits unsigned integer. Example 1: Example 2: Note: 思路 : Solution (C++) : 性能 : Runtime: 4 ms Memory Usage: 6.7 MB ...
分类:
其他好文 时间:
2020-04-06 17:33:56
阅读次数:
69