码迷,mamicode.com
首页 >  
搜索关键字:aa    ( 3606个结果
剑指offer python版 数组中出现次数超过一半的数字
def aa(nums): if not nums: return False hashes={} ret=[] for s in nums: hashes[s]=hashes[s]+1 if hashes.get(s) else 1 if hashes[s] >len(nums)/2: re... ...
分类:编程语言   时间:2018-10-26 14:24:24    阅读次数:140
剑指offer python版 顺时针打印矩阵
def aa(matrix): rows=len(matrix) cols=len(matrix[0]) start=0 ret=[] while start*2 <rows and start*2<cols: bb(matrix,rows,cols,start,ret) start +=1 ret... ...
分类:编程语言   时间:2018-10-26 10:47:01    阅读次数:197
剑指offer python版 赋值运算符
class aa(object): def __init__(self,x): self.val=x def __add__(self,other): x=self.val-other.val return x a=aa(10) b=aa(2) c=b+a print(c)... ...
分类:编程语言   时间:2018-10-25 10:58:41    阅读次数:205
js金额转大写(万元为单位)
function NoToChinese(num) { var AA = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"); var BB = new Array("", "拾", "佰", "仟", "萬", "億&q ...
分类:Web程序   时间:2018-10-25 00:26:10    阅读次数:501
计算Sn
求Sn=a+aa+aaa+…+aa…aaa(有n个a)之值,其中a是一个数字。 例如:2+22+222+2222+22222(n=5), 求Sn=a+aa+aaa+…+aa…aaa(有n个a)之值,其中a是一个数字。 例如:2+22+222+2222+22222(n=5), 输入 输入两个数.第一个 ...
分类:其他好文   时间:2018-10-23 20:42:38    阅读次数:138
Python与Go斐波那契数列
#!/usr/bin/env python # -*- coding: utf-8 -*- # 斐波那契数列 def fibonacci_sequence(num): aa = 0 b = 1 li = list() li.append(aa) li.append(b) for i in range... ...
分类:编程语言   时间:2018-10-23 14:59:40    阅读次数:123
shell切分字符串到数组
shell切分字符串到数组 问题:对于’aa,bb,cc,dd,ee’这样的字符串输出采用,分隔开的aa bb cc dd ee 和aa:bb is ok:/home/work按照":"分割开来的aa bb is ok /home/work。 特征:在字符串中没有空格 解决方法1: 解决方法2: ...
分类:编程语言   时间:2018-10-22 21:26:01    阅读次数:163
CodeForces E. Binary Numbers AND Sum
http://codeforces.com/contest/1066/problem/E You are given two huge binary integer numbers aa and bb of lengths nn and mm respectively. You will repea ...
分类:其他好文   时间:2018-10-20 21:06:14    阅读次数:226
CodeForces D. Concatenated Multiples
http://codeforces.com/contest/1029/problem/D You are given an array aa, consisting of nn positive integers. Let's call a concatenation of numbers xx a ...
分类:其他好文   时间:2018-10-20 21:03:51    阅读次数:212
从一个文件中读取数据到内存,然后再把内存中的数据写入另外一个文件
//从一个文件中读取数据到内存,然后再把内存中的数据写入另外一个文件#include"stdafx.h"#include"stdlib.h"intmain(intargc,char*argv[]){FILE*fp;FILE*fp2;fp=fopen("C:/notepad.exe","rb");fp2=fopen("C:/aa.exe","wb");fsee
分类:其他好文   时间:2018-10-19 13:58:47    阅读次数:171
3606条   上一页 1 ... 66 67 68 69 70 ... 361 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!