題目:給你一個數字n,將裡面每位的數重新組合形成a,b,使得a-b最大且是9的倍數。
分析:數論。題目要求a,b和n的位數相同,不能有前導0。
定理1:交換一個數字中的某兩個位的數,形成的新數組和原數字之差是9的倍數;
證明1:設數字為abc..i..j...xwz,其中每个字母代表一个位,对应值可以相同,...
分类:
其他好文 时间:
2015-07-08 22:39:58
阅读次数:
196
Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 ...
分类:
其他好文 时间:
2015-07-08 22:21:12
阅读次数:
121
controls: ol.control.defaults().extend([new ol.control.ZoomToExtent({ extent:[Number(box[0]), Number(box[1]), Number(box[2]), N...
分类:
其他好文 时间:
2015-07-08 22:17:36
阅读次数:
585
Description
You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able...
分类:
其他好文 时间:
2015-07-08 21:04:04
阅读次数:
137
【cat】 合并文件和打印到标准输出命令格式:cat [OPTION]... [FILE]...命令功能:拼接文件或者做标准输入输出命令格式:cat [OPTION]... [FILE]...命令参数:-A, --show-all 等价于-vET-b, --number-nonblank 输出...
分类:
其他好文 时间:
2015-07-08 20:52:27
阅读次数:
117
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2015-07-08 20:24:43
阅读次数:
112
PHP ECMAScript 向上取整 ceil($number) Math.ceil( number ) 向下取整 floor($number) Math.floor( number ) 绝对值 abs($number) Math.abs( number ) 四舍五入 round($number,...
分类:
Web程序 时间:
2015-07-08 18:45:47
阅读次数:
152
引用的概念实际上跟C语言的差不多,我理解就是一个指向内存地址的指针,只不过没有指向指针的指针之类。针对引用类型进行的不同操作,会造成互相的影响。在javaScript里,有五种基本类型,undefined,null,Number,String,Boolean,还有一种复杂类型是Object。,Obj...
分类:
其他好文 时间:
2015-07-08 18:30:06
阅读次数:
134
--创建表create table abc(id number(4) not null primary key,username varchar2(20) not null,pwd varchar2(20) not null);--创建序列create sequence abc_sequence ....
分类:
数据库 时间:
2015-07-08 18:04:57
阅读次数:
129