diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -97,7 +97,7 @@
     masu = [[False for _ in range(W)] for j in range(H)]
     csum = 0
     for p in item:
-        csum += p[0]
+        csum += p[0] * p[1]
     if csum != H * W:
         continue
     dfs(0, 0, item, masu)
