Concepts2
∑MathAdvanced
Floor Sum Formula
The floor sum computes S(n,m,a,b) = sum_{i=0}^{n-1} floor((a i + b)/m) efficiently in O(log(min(a,m))) time.
#floor sum#atcoder library#euclidean algorithm+12
⚙️AlgorithmIntermediate
Digit DP
Digit DP is a dynamic programming technique for counting or aggregating values over all integers in a range that satisfy a digit-based property.
#digit dp#dynamic programming#tight constraint+12