问下careercup上的这一题# JobHunting - 待字闺中
S*e
1 楼
http://www.careercup.com/question?id=14552712
“Given a number , say 263 , is said to be colorful if the product of all
its substrings is unique . 2 , 6 , 3 , 6*3 , 2*6 .But 2*3 is NOT a valid
product . We have to consider substring only. Tell whether the number is
colorful or not”
我看了半天没看懂题目意思。是不是说求一个string的所有substring,然后两两相乘
,如果所有结果都不一样,那说明这个string是colorful的?
“Given a number , say 263 , is said to be colorful if the product of all
its substrings is unique . 2 , 6 , 3 , 6*3 , 2*6 .But 2*3 is NOT a valid
product . We have to consider substring only. Tell whether the number is
colorful or not”
我看了半天没看懂题目意思。是不是说求一个string的所有substring,然后两两相乘
,如果所有结果都不一样,那说明这个string是colorful的?