fx050622's recent timeline updates
fx050622

fx050622

V2EX member #84611, joined on 2014-12-01 12:10:27 +08:00
fx050622's recent replies
Dec 30, 2020
Replied to a topic by marine2c MySQL MYSQL 订单查询求助
@marine2c 是的,自关联一下
Dec 30, 2020
Replied to a topic by marine2c MySQL MYSQL 订单查询求助
是不是可以理解为 下单之后连续 30 分钟内下单超过 20 次的用户?
select a.ip,a.下单时间,b.下单时间 from a,b where a.会员=b.会员 and b.下单时间<=a.下单时间+30

group by a.ip,a.下单时间 count(b.下单时间)
我觉得你想复杂了,取模应该不影响 An 的计算的.
mod(A(n+1))=mod(mod(A(n))*A)
array=[1,1,1,0]
我自己 PC 试了下 782736251 次 5.3s

def multiply(array: Array[Int], times: Int, mode: Int = 127):Unit = {
if (times > 0) {
val t1 = array(0)
val t2 = array(1)
val t3 = array(2)
val t4 = array(3)
array(0) = (t1 + t2) % mode
array(1) = t1
array(2) = (t3 + t4) % mode
array(3) = t3
multiply(array, times - 1)
}
}
+1
Dec 20, 2016
Replied to a topic by luoluoluo 音乐 日语歌曲推荐
夏川里美
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1280 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 17:24 · PVG 01:24 · LAX 10:24 · JFK 13:24
♥ Do have faith in what you're doing.