☰
Module linear_floor_sum
Module linear_floor_sum
Traits
?
Module
nekolib
::
math
::
linear_floor_sum
source
·
[
−
]
Expand description
∑
i
=
0
n
−
1
⌊
a
i
+
b
m
⌋
.
\sum_{i=0}^{n-1} \left\lfloor\frac{ai+b}{m}\right\rfloor.
∑
i
=
0
n
−
1
⌊
m
ai
+
b
⌋
.
Traits
LinearFloorSum
∑
i
=
0
n
−
1
⌊
a
i
+
b
m
⌋
.
\sum_{i=0}^{n-1} \left\lfloor\frac{ai+b}{m}\right\rfloor.
∑
i
=
0
n
−
1
⌊
m
ai
+
b
⌋
.