@@ -0,0 +1,626 @@
+class Solution:%0A    # @param n, an integer%0A    # @return a string%0A    def countAndSay(self, n):%0A        ret = '1'%0A        for i in range(1, n):%0A            char = ret%5B0%5D%0A            num = 1%0A            current = %22%22%0A            for j in range(1, len(ret)):%0A                if char == ret%5Bj%5D:%0A                    num = num + 1%0A                else:%0A                    current += str(num) + char%0A                    char = ret%5Bj%5D%0A                    num = 1%0A            current += str(num) + char%0A            ret = current%0A        return ret%0A%0A# test%0Asolution = Solution()%0Afor i in range(1, 8):%0A    print solution.countAndSay(i)%0A

add count and say