import java.util.Scanner;/** * Created by Administrator on 14-5-13. * 计算斐波那契数列 * * Result M(Problem prob) { if () return ; // The problem cannot be so...
分类:
其他好文 时间:
2014-07-15 00:39:15
阅读次数:
408
def Mean(t): """均值""" return float(sum(t)) / len(t)
分类:
其他好文 时间:
2014-07-15 00:09:49
阅读次数:
516
def Mode(t): """众数""" if not t: return None arr = __getfreq(t) if arr[0][0] == 1: return None else: for k, g in it...
分类:
其他好文 时间:
2014-07-15 00:03:24
阅读次数:
278
def Median(t): """中位数""" arr = sorted(t) idx = (len(arr) - 1) / 2 if type(idx) is int: return arr[idx] if type(idx) is float: ...
分类:
其他好文 时间:
2014-07-14 23:49:19
阅读次数:
334
def Var(t, mu=None): """方差""" if mu is None: mu = Mean(t) # compute the squared deviations and return their mean. dev2 = [(x - mu)*...
分类:
其他好文 时间:
2014-07-14 23:28:48
阅读次数:
265
/** * * @param zipFile 压缩包文件对象 * @param listKey 压缩的图片物理地址 * @return */ public static boolean packageZip(File zipFile,List li...
分类:
编程语言 时间:
2014-07-14 23:21:36
阅读次数:
357
联通块是指给定n个点,输入a,b(1#includeusing namespace std;const int maxn=1010;int p[maxn];//作为每个独立的点 int sum[maxn];//每个节点下面连接的点 int find(int x) {if(x==p[x])return...
分类:
移动开发 时间:
2014-07-14 22:21:30
阅读次数:
403
def say_goodnight(name) result ="Good night ." +name return resultenddef say_goodmorning(name) result ="Good morning .#{name}" return resultendde...
分类:
其他好文 时间:
2014-07-14 14:14:34
阅读次数:
189
描述
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in ...
分类:
其他好文 时间:
2014-07-14 13:46:43
阅读次数:
229
<?php//验证码类classp_w_picpath{protected$im;protected$img_width;protected$img_height;protected$img_type;//生成随机数staticpublicfunctionrandStr($n=4){if($n<=0){return‘‘;}$str=‘abcdefghijkmnpqrstuvwxyzABCDEFGHIJKMNPQRSTUVWXYZ0123456789‘;$str=substr(st..
分类:
Web程序 时间:
2014-07-14 12:16:07
阅读次数:
287