码迷,mamicode.com
首页 >  
搜索关键字:numbers range    ( 16974个结果
Python 排序算法的实现
冒泡排序:1 def bubble(l):2 length = len(l)3 for i in range(length):4 for j in range(i+1, length):5 if l[i] > l[j]:6 ...
分类:编程语言   时间:2014-08-06 22:23:07    阅读次数:223
Sum Root to Leaf Numbers
问题:根节点到叶子结点的所有权值和分析:从根节点遍历,若遍历到叶子结点,则sum+其路径的所有权值和/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * Tree...
分类:其他好文   时间:2014-08-06 21:59:32    阅读次数:184
让python代码运行的更快
原文地址:http://infiniteloop.in/blog/quick-python-performance-optimization-part-i/ 往往小的改变却能带来大的性能提升, 下面说下python中的几点性能优化。 1.使用timeit模块 2.减少函数的调用次数 3.使用xrange代替range 4.''.join()代替+,+= 5.while 1 代替 wh...
分类:编程语言   时间:2014-08-06 19:28:32    阅读次数:247
Prime Distance(二次筛素数)
Description The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the qu...
分类:其他好文   时间:2014-08-06 19:06:42    阅读次数:319
New Hire Training Experience
Game Description: 1. In a closed door, there will be a circle, and 30 numbers in the circle. 2. Each team (about 10 people) need to take number out of the circle by ascend order. 3. Each team has...
分类:其他好文   时间:2014-08-06 19:06:02    阅读次数:359
把随机得到的数,个十百位分别相加
import java.util.Random;import javax.swing.JOptionPane;public class Numbers { public static void main(String[] args){ double digit; d...
分类:其他好文   时间:2014-08-06 18:11:31    阅读次数:208
HDU4911:Inversion
Problem Description bobo has a sequence a1,a2,…,an. He is allowed to swap two adjacent numbers for no more than k times. Find the minimum number of inversions after his swaps. Note: The numbe...
分类:其他好文   时间:2014-08-06 14:51:38    阅读次数:177
C程序设计语言部分习题
1:编写一个程序,确定分别由signed ,unsigned 限定的char short long int的取值范围。采用打印标准头文件中的相应值以及直接计算两种方式实现。头文件的实现方式:#include #include /*determin range of int types*/int ma...
分类:其他好文   时间:2014-08-06 14:14:51    阅读次数:229
crusher plant and mobile plant
We hold expertise in manufacturing a wide range of Industrial machines Sand Making Machine that find application in various purposes. Manufactured as ...
分类:其他好文   时间:2014-08-06 11:42:11    阅读次数:271
周赛 POJ 2245 Lotto
Description In the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although it doesn't increase your chance of winning - is to select a subse...
分类:其他好文   时间:2014-08-06 10:37:11    阅读次数:358
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!