14
ผลรวมสะสมแบบวนซ้ำของ [N] ด้วยการวนซ้ำ M
ใช้จำนวนเต็มบวกสองจำนวนNแล้วMสร้างผลบวกสะสม[N]โดยมีMการวนซ้ำ เอาต์พุตผลลัพธ์ของการวนซ้ำล่าสุด คำจำกัดความของผลรวมสะสมตัดแบ่ง: เริ่มต้นด้วยตัวเลขNและกำหนดลำดับX = [N] ผนวกกับXผลรวมสะสมของX ทำซ้ำขั้นตอนที่ 2 Mครั้ง ผลรวมสะสมของเวกเตอร์X = [x1, x2, x3, x4]คือ: [x1, x1+x2, x1+x2+x3, x1+x2+x3+x4]. ตัวอย่างด้วยN = 1และM = 4: P = ฟังก์ชันผลรวมสะสม M = 0: [1] M = 1: [1, 1] - X = [1, P(1)] = [[1], [1]] M = 2: [1, 1, …
14
code-golf
number
sequence
code-golf
number
sequence
code-golf
binary-matrix
code-golf
math
tips
javascript
algorithm
code-golf
string
code-golf
number
sequence
code-golf
math
arithmetic
parsing
code-golf
number
sequence
primes
code-golf
string
ascii-art
geometry
integer
code-golf
geometry
code-golf
number
array-manipulation
code-golf
math
geometry
code-golf
number
sequence
arithmetic
integer
code-golf
string
kolmogorov-complexity
code-golf
number
code-golf
number
chess
code-golf
sequence
decision-problem
subsequence
code-golf
math
number
primes
code-golf
primes
permutations
code-golf
integer
probability-theory
statistics
code-golf
string
code-golf
sequence
decision-problem
parsing
board-game
code-golf
binary
graph-theory
code-golf
board-game
classification
tic-tac-toe
code-golf
ascii-art
polyglot
code-golf
date
code-golf
geometry