 |
|
lordofhollows
V2EX member #487946, joined on 2020-05-06 13:43:14 +08:00
|
lordofhollows's recent replies
可能是因为有 value 为 null 的记录,可以试下:sum(nvl(a.value, 0))
当年找毕业实习时,面试官问我什么是 C++,直接一脸懵逼
可惜技术栈不一样,用 Java 做了好多年的 Dashboard 和报表
用 Python 讲解的 SICP:BV16W411W76H
CS 61A: Structure and Interpretation of Computer Programs
function alg(n) {
res = 0 // 吃到的桃子
x = n * 3 // 桃子数
y = 0 // 桃核数
while (x > 0 || y >= 3) {
res += x // 全吃掉
y += x // 扔桃核
x = Math.floor(y / 3) // 换桃子
y = y % 3 // 剩下的桃核
}
return res
}
alg(135142857) === 608142856