想找一道题的解法# JobHunting - 待字闺中
b*z
1 楼
板上应该有,找不到了,
给一个长字符串,和一个每行最大字符个数限制,要求分行,但是每行末尾要加 (i/n
),比如:
given "this is a long string test", charLimit = 15, output:
this is a (1/4)
long (2/4)
string (3/4)
test (4/4)
怎么求最终的行数?
给一个长字符串,和一个每行最大字符个数限制,要求分行,但是每行末尾要加 (i/n
),比如:
given "this is a long string test", charLimit = 15, output:
this is a (1/4)
long (2/4)
string (3/4)
test (4/4)
怎么求最终的行数?