diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -47,7 +47,7 @@
     for j in range(n + 1)[::-1]:
         for k in range(j, n + 1)[::-1]:
             if dp[j][k] == 0:
-                break
+                continue
             # i 個を l セット置く
             r = finv[i]
             for l in range(1, n + 1):
