码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
Python基础教程笔记——第6章:抽象(函数)
(1)计算裴波那契数列:1 fbis=[0,1]2 num=int(input("please input the number"))3 for i in range(num-2):4 fbis.append(fbis[-2]+fbis[-1])5 print(fbis) 6.3 ...
分类:编程语言   时间:2015-08-08 10:21:34    阅读次数:144
codeforces55D数位dp
codeforces55D查询给定区间内的beautiful number。 一个数字是beautiful number当且仅当能被自己的各个数字不为0的位整除。这个dp的状态还是挺难想的。一个数能被自己的各个位整除,那么必须是这些位的最小公倍数的倍数。那么可以想到的一个状态是dp[i][j][k]...
分类:其他好文   时间:2015-08-08 09:05:05    阅读次数:173
【LeetCode-面试算法经典-Java实现】【104-Maximum Depth of Binary Tree(二叉树的最大深度)】
【104-Maximum Depth of Binary Tree(二叉树的最大深度)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题  Given a binary tree, find its maximum depth.   The maximum depth is the number of nodes along the longest path from th...
分类:编程语言   时间:2015-08-08 07:59:24    阅读次数:126
PAT 1029. Median (25)
1029. Median (25)Given an increasing sequence S of N integers, themedianis the number at the middle position. For example, the median of S1={11, 12, 1...
分类:其他好文   时间:2015-08-08 01:11:56    阅读次数:139
oracle ip字符与ip数值之间的相互转换
字符ip向数值转换:1 create or replace function f_ip2number (v_ip in varchar2) return number is2 i number;3 begin4 i:=regexp_substr(v_ip,'(\d{1,3})',1,1)*167.....
分类:数据库   时间:2015-08-07 23:56:20    阅读次数:405
[leedcode 222] Count Complete Tree Nodes
Given acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete binary tree every level, except...
分类:其他好文   时间:2015-08-07 23:53:56    阅读次数:135
LeetCode (17)Letter Combinations of a Phone Number
题目Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit string “23”...
分类:其他好文   时间:2015-08-07 22:23:27    阅读次数:195
左右相等
DescriptionOnce Bob took a paper stripe ofnsquares (the height of the stripe is 1 square). In each square he wrote an integer number, possibly negativ...
分类:其他好文   时间:2015-08-07 22:15:50    阅读次数:127
CodeForces 18C - Stripe 解题心得
原题:DescriptionOnce Bob took a paper stripe ofnsquares (the height of the stripe is 1 square). In each square he wrote an integer number, possibly nega...
分类:其他好文   时间:2015-08-07 22:11:14    阅读次数:139
HDU 4911 Inversion - 疯狂的癫子 解题心得
原题:Descriptionbobo has a sequence a1,a2,…,an. He is allowed to swap twoadjacentnumbers for no more than k times.Find the minimum number of inversions ...
分类:其他好文   时间:2015-08-07 22:05:30    阅读次数:88
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!