码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
Prime Ring Problem HDU 杭电1016
Problem Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime...
分类:其他好文   时间:2015-08-04 11:10:54    阅读次数:104
LeetCode 边做边记录
其实就是把有道云笔记的东西搬过来,不定期会更新随便写写的东西,很多都需要优化,如果有人看到,希望能给点建议,谢谢!1.Palindrome Number public class Solution { public boolean isPalindrome(int x) { i...
分类:其他好文   时间:2015-08-04 11:04:36    阅读次数:116
POJ-2689 Prime Distance (两重筛素数,区间平移)
Prime DistanceTime Limit:1000MSMemory Limit:65536KTotal Submissions:13961Accepted:3725DescriptionThe branch of mathematics called number theory is abo...
分类:其他好文   时间:2015-08-04 10:54:09    阅读次数:96
leetcode 233 Number of Digit One
这题属于需要找规律的题。先想一下最简单的情形:N = 10^n - 1记X[i]表示从1到10^i - 1中 1的个数,则有如下递推公式:X[i] = 10 * X[i - 1] + 10^(i - 1)这个递推公式可以这么观察得到:i =0,X[0] = 0i = 1,从1到9, X[1]= 1i...
分类:其他好文   时间:2015-08-04 10:38:45    阅读次数:96
【算法】米勒-拉宾素性检验
Prime or Not: Given the number, you are to answer the question: "Is it prime?" Input: t – the number of test cases, then t test cases follows. [t ≤ 500] Each line contains one integer: N [2 ≤ N ≤ 2...
分类:编程语言   时间:2015-08-04 08:13:41    阅读次数:480
Oracle笔记-表的管理
3.1创建和管理表在Oracle表中使用的emp,dept,sal都是系统内建好的表,那么在SQL语法中同样支持了表的创建语句,要想创建表,则应先了解下Oracle中最常用的几种数据类型3.1.1常用的数据类型--(重点)常用的数据类型,如之前的emp表中已经出现了三种NUMBER(n):表示一个整...
分类:数据库   时间:2015-08-04 00:36:13    阅读次数:122
jquery显示隐藏操作
记得还是当初开始学习jquery的时候有去用心看看文档,然后在做项目的时候偶尔有用到,一直没有闲暇之余去温习,去整理所谓的基础,看了后有些淡忘的得意再次更新。第一、隐藏显示以下所有的代码如无特殊声明中speed的值可选且可填写(slow,fast,number(毫秒))。callback为执行完后要...
分类:Web程序   时间:2015-08-04 00:30:27    阅读次数:193
【LeetCode】191 - Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For example, the 32-bit in...
分类:其他好文   时间:2015-08-04 00:16:38    阅读次数:102
[leedcode 204] Count Primes
Description:Count the number of prime numbers less than a non-negative number,n.public class Solution { public int countPrimes(int n) { //筛选...
分类:其他好文   时间:2015-08-04 00:15:09    阅读次数:95
hdu1518(Square)深搜+剪枝
点击打开杭电1518 Problem Description Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square?   Input The first line of input contains N, the number of t...
分类:其他好文   时间:2015-08-03 22:52:21    阅读次数:172
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!