update (select length(t.name), t.* -- name,length(name) from g_enterprise_info t where nvl2(translate(name, '\1234567890 ', '\'), 'is characters ', 'is number ') = 'is number ' and asciistr(gszcdjh) like '%\%') set name = gszcdjh, gszcdjh =name ; 判断一
Anton has a positive integer n, however, it quite looks like a mess, so he wants to make it beautiful after k swaps of digits. Let the decimal representation of n as (x1x2⋯xm)10 satisfying that 1≤x1≤9, 0≤xi≤9 (2≤i≤m), which means n=∑mi=1xi10m−i. In e
思路分析:任何一个数字异或它自己都等于0,根据这一特性,如果从头到尾依次异或数组中的每一个数字,因为那些出现两次的数字全部在异或中抵消掉了,所以最终的结果刚好是那些只出现一次的数字. 代码如下: #include "stdafx.h" #include <stdio.h> int findNotDouble(int a[], int n) { ]; int i; ; i < n; ++i) result ^= a[i]; return result; } int ma
select gid, username from users where FIND_IN_SET(8,gid); //查询gid里含有数字8的记录,gid是varchar ,数据格式:"1,12,8,18,5" select gid, username from users where !FIND_IN_SET(8,gid); //查询gid里不含有数字8的记录,gid是varchar ,数据格式:"1,12,8,18,5"
主要思想: 数组可以无序 假设数字里的值都为正 循环判断数组 如果与前面的数字相同则变为-1 然后记录-1的个数算出重复值 然后重新new一个减去重复值长度的新数组 和原数组判断 不为-1的全部复制进来即可 代码如下: package Del_Same_Num; public class Del_Same_Num { static int count=0; //计算重复值 public static int count_same_number(int[] a) { for(int i=0;i<a