安装 pip3 install setuptools pip3 install pykafka pip3 install kafka-python 单台kafka import sys from kafka import KafkaConsumer from kafka.structs import ...
分类:
编程语言 时间:
2020-06-24 21:46:18
阅读次数:
80
1095 Cars on Campus (30分) Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers ...
分类:
编程语言 时间:
2020-06-24 00:20:12
阅读次数:
73
一、技术总结 这一题主要学习到两个知识点,一个是stoi函数的使用,之前已经讲过了,可以将一个字符串转化为10进制的数字; 还有就是字符串string中insert函数的使用,可以str.insert(0, num, '0');意思是在下标为0处插入num个字符‘0’; 还有就是使用dowhile; ...
分类:
其他好文 时间:
2020-06-23 21:22:54
阅读次数:
42
Being a nonconformist, Volodya is displeased with the current state of things, particularly with the order of natural numbers (natural number is posit ...
分类:
其他好文 时间:
2020-06-23 21:22:33
阅读次数:
63
import random def getBaseBigHapppyNumbers(): frontNumbers = set(); backNumbers = set(); while(len(frontNumbers)<5): cur = random.randint(1, 35) frontN ...
分类:
其他好文 时间:
2020-06-22 13:24:29
阅读次数:
60
1295. 质因数统计 中文English 题目给定一个正整数N,你需要统计(1,N]之间所有整数质数分解后,所有质数的总个数。 样例 输入:6 输出:7 解释:2=2, 3=3, 4=2*2, 5=5, 6=2*3, 个数和为1+1+2+1+2=7 注意事项 1<N<=100000 class S ...
分类:
其他好文 时间:
2020-06-21 09:55:03
阅读次数:
72
Perfect Squares (M) 题目 Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. Exa ...
分类:
其他好文 时间:
2020-06-21 09:19:56
阅读次数:
46
Java方法 什么是方法? Java方法是语句的集合,他们在一起执行一个功能。 方法是解决问题步骤的有序集合。 方法包含于类或对象中。 方法在程序中被创建,在其他地方被引用。 设计方法原则:一个方法只完成一个功能。 方法的本意是功能块,即实现某个功能的语句块的集合。我们设计方法的时候最好保持方法的原 ...
分类:
编程语言 时间:
2020-06-20 21:25:02
阅读次数:
44
Different Ways to Add Parentheses (M) 题目 Given a string of numbers and operators, return all possible results from computing all the different possibl ...
分类:
其他好文 时间:
2020-06-19 12:31:00
阅读次数:
43
/*保留小数(四舍五入)data:要保留的数,val:保留的位数*/ function ToFixed(data,val){ var numbers = ''; // 保留几位小数后面添加几个0 for (var i = 0; i < val; i++) { numbers += '0'; } va ...
分类:
其他好文 时间:
2020-06-18 19:19:54
阅读次数:
51