diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -11,7 +11,7 @@
 
 for i in range(n):
     for j in range(n):
-        if a[i] == b[j]:
+        if i != j and a[i] == b[j]:
             ans2 += 1
 
 print(ans1)
