@@ -0,0 +1,462 @@
+import unittest%0A%0A%0Aclass Solution(object):%0A    def addDigits(self, num):%0A        %22%22%22%0A        :type num: int%0A        :rtype: int%0A        %22%22%22%0A        return (num - 1) %25 9 + 1 if num else 0%0A%0A%0Aclass Test(unittest.TestCase):%0A    def test(self):%0A        self._test(38, 2)%0A        self._test(0, 0)%0A%0A    def _test(self, num, expected):%0A        actual = Solution().addDigits(num)%0A        self.assertEqual(actual, expected)%0A%0A%0Aif __name__ == '__main__':%0A    unittest.main()%0A

258. Add Digits. Induction