Source - 1차 ¶
~cpp function idx = selfd(N) seq =[[1 2 2] zeros(1,500000)]; idx = 4; acc = 5; x = 3; while 1 for i = 1 : seq(X) seq(idx) = x; acc = acc + x; if acc >= n return end idx = idx + 1; end x = x + 1; end
~cpp function idx = selfd(N) seq =[[1 2 2] zeros(1,500000)]; idx = 4; acc = 5; x = 3; while 1 for i = 1 : seq(X) seq(idx) = x; acc = acc + x; if acc >= n return end idx = idx + 1; end x = x + 1; end