class Solution(object):
    def twoSum(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: List[int]
        """
        for k, i in enumerate(nums):
            for z, j in enumerate(nums[k+1:]):
				if target == i + j:
					print "index1=%d, index2=%d" % (k + 1, k + 1 + z + 1)
					return
@@ -17,20 +17,17 @@
 bject):%0A
-    
+%09
 def twoS
@@ -28,16 +28,17 @@
 f twoSum
+d
 (self, n
@@ -51,36 +51,24 @@
 arget):%0A
-        %22%22%22%0A        
+%09%09%22%22%22%0A%09%09
 :type nu
@@ -81,24 +81,18 @@
 st%5Bint%5D%0A
-        
+%09%09
 :type ta
@@ -101,24 +101,18 @@
 et: int%0A
-        
+%09%09
 :rtype: 
@@ -125,36 +125,137 @@
 nt%5D%0A
-        %22%22%22%0A        
+%09%09%22%22%22%0A%09%09ntarget = target%0A%09%09if target == 0:%0A%09%09%09target = 1%0A%09%09if target %3C 0:%0A%09%09%09target = 0 - target%0A%09%09t = %5BNone%5D * target%0A%09%09
 for k, 
-i
+v
  in 
@@ -275,62 +275,220 @@
 s):%0A
-            for z, j in enumerate(nums%5Bk+1:%5D
+%09%09%09h = v %25 target%0A%09%09%09if h %3C 0:%0A%09%09%09%09h = target + h%0A%09%09%09g = (target - v) %25 target%0A%09%09%09if g %3C 0:%0A%09%09%09%09g = target + hs%0A%09%09%09if t%5Bh%5D == None:%0A%09%09%09%09 t%5Bh%5D = dict()%0A%09%09%09if t%5Bg%5D != None:%0A%09%09%09%09for (m, n) in t%5Bg%5D.items(
 ):%0A
+%09
 %09%09%09%09if 
+n
 targ
@@ -497,15 +497,16 @@
  == 
-i + j
+v + n
 :%0A
+%09
 %09%09%09%09
@@ -511,17 +511,17 @@
 %09%09%09print
- 
+(
 %22index1=
@@ -542,30 +542,20 @@
  %25 (
-k + 1, k + 1 + z + 1
+m+1, k+1)
 )%0A
+%09
 %09%09%09%09
@@ -561,8 +561,34 @@
 %09%09return
+ (m+1, k+1)%0A%09%09%09t%5Bh%5D%5Bk%5D = v

1. accepted solution for TwoSum, Problem No.1