28
シンプルなワードラッパーを作成する
(注:これは私の初めてのコードゴルフの質問ですが、私が知る限り、誰もこれを正確に行っていないので、私は良いはずです。) あなたの仕事は、文字列sと整数を取り込んで、n複数の行に折り返されたテキストを返すか出力するプログラムまたは関数を作成することです。各単語は完全に1行である必要があります。つまり、途中で単語が分割されません。各行はn文字より長くすることはできません。また、各行にできるだけ多くの単語を収める必要があります。 例: s = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eget erat lectus. Morbi mi mi, fringilla sed suscipit ullamcorper, tristique at mauris. Morbi non commodo nibh. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed at iaculis mauris. Praesent a …
22
code-golf
string
code-golf
string
parsing
apl
math
primes
integer
fastest-code
code-golf
math
primes
integer
code-golf
ascii-art
kolmogorov-complexity
code-golf
string
array-manipulation
code-golf
number
code-golf
sequence
code-golf
math
arithmetic
code-golf
date
conversion
code-golf
geometry
combinatorics
grid
code-golf
string
code-golf
counting
java
code-golf
chess
code-golf
path-finding
conversion
atomic-code-golf
logic-gates
code-golf
fibonacci
code-golf
ascii-art
fractal
code-golf
quine
code-golf
string
code-golf
array-manipulation
decision-problem
code-golf
quine
code-golf
code-challenge
array-manipulation
code-challenge
word-search
code-golf
binary
conversion
code-golf
code-golf
restricted-source
code-golf
kolmogorov-complexity
restricted-source
code-golf
kolmogorov-complexity
random
animation