一道C++面试编程题# Programming - 葵花宝典
s*d
1 楼
【 以下文字转载自 JobHunting 讨论区 】
发信人: saiad (happy), 信区: JobHunting
标 题: 一道C++面试编程题
发信站: BBS 未名空间站 (Mon Jan 8 21:06:55 2007), 转信
We have a string of digits, find the minimum number of additions required
for the string to equal some target number. Each addition is the equivalent
of inserting a plus sign somewhere into the string of digits. After all plus
signs are inserted, evaluate the sum as usual. For example, consider the
string "12" . With zero additions, we can achieve the number 12. If we
inse
发信人: saiad (happy), 信区: JobHunting
标 题: 一道C++面试编程题
发信站: BBS 未名空间站 (Mon Jan 8 21:06:55 2007), 转信
We have a string of digits, find the minimum number of additions required
for the string to equal some target number. Each addition is the equivalent
of inserting a plus sign somewhere into the string of digits. After all plus
signs are inserted, evaluate the sum as usual. For example, consider the
string "12" . With zero additions, we can achieve the number 12. If we
inse