//到达2 , 3 ... k的最小公倍数为lcm
//当x到达lcm的倍数时,x只能减一
//又从a到b一定会过lcm的倍数
//我们将a,b以lcm分割
//那么完整的lcm段的最小数是相同的,所以我们只需要计算一个lcm段的最小值乘以完整lcm段的个数
//以及首尾的不全的lcm段的和即为答案
#include
#include
#include
#include
usi...
分类:
其他好文 时间:
2015-04-28 14:09:09
阅读次数:
112
1, 主板信息.查看主板的序列号--------------------------------------------------#使用命令dmidecode | grep -i 'serial number'#查看板卡信息cat /proc/pci------------------------...
分类:
系统相关 时间:
2015-04-28 13:49:05
阅读次数:
154
Number SequenceTime Limit:1000MSMemory Limit:10000KTotal Submissions:35251Accepted:10151DescriptionA single positive integer i is given. Write a progr...
分类:
其他好文 时间:
2015-04-28 13:27:26
阅读次数:
104
表格内容居中:
td?{text-align:center;}
表格最小高度:
line-height:25px;
div最小高度:
min-height:25px;
修改指定列内容:
function?changenumber(){
for(i=0;?i<?$(‘.class_td_audit_number‘).len...
分类:
其他好文 时间:
2015-04-28 12:09:11
阅读次数:
121
Description:
Count the number of prime numbers less than a non-negative number, n解题思路采用Eratosthenes筛选法,依次分别去掉2的倍数,3的倍数,5的倍数,……,最后剩下的即为素数。实现代码class Solution {
public:
int countPrimes(int n) {...
分类:
其他好文 时间:
2015-04-28 11:54:15
阅读次数:
114
我的vim 配置:
set number //显示行号
set showmatch //自动关联括号
set tabstop=4...
分类:
其他好文 时间:
2015-04-28 11:50:00
阅读次数:
131
problem:
Given a binary tree containing digits from 0-9 only,
each root-to-leaf path could represent a number.
An example is the root-to-leaf path 1->2->3 which
represents the number...
分类:
其他好文 时间:
2015-04-28 11:48:32
阅读次数:
160
【题目】Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,...
分类:
其他好文 时间:
2015-04-28 11:34:29
阅读次数:
102
--约束 对列的值起一个约束的作用,规定咧的值得范围--主键,外键,非空,自增长标识列,唯一列,check 约束select *from score--存储累加求和alter proc qiuhe@number intas declare @sum int--定义一个变量 int类型 ...
分类:
数据库 时间:
2015-04-28 11:32:11
阅读次数:
136
题目:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the ta...
分类:
其他好文 时间:
2015-04-28 09:43:36
阅读次数:
139