diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -5,14 +5,16 @@
 import bisect
 import itertools
 import functools
+
+
 class Solution:
-    def minimumPartition(self, s: str, k: int) -> int
-        
+    def minimumPartition(self, s: str, k: int) -> int:
+        curr, ans = 0, 1
         for d in s:
             if int(d) > k:
                 return -1
-            curr = 10 * curt + int(d)
+            curr = 10 * curr + int(d)
             if curr > k:
                 ans += 1
-                curr = d
+                curr = int(d)
         return ans
