rewrite leetcode multiply strings