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
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
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
function NoToChinese(num) { var AA = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"); var BB = new Array("", "拾", "佰", "仟", "萬", "億&q ...
分类:
Web程序 时间:
2018-10-25 00:26:10
阅读次数:
501
求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
#!/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切分字符串到数组 问题:对于’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
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
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