aboutsummaryrefslogtreecommitdiff
path: root/challenge-283
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-283')
-rw-r--r--challenge-283/pokgopun/python/ch-2.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/challenge-283/pokgopun/python/ch-2.py b/challenge-283/pokgopun/python/ch-2.py
index a867d2d1f9..b3dc4a444c 100644
--- a/challenge-283/pokgopun/python/ch-2.py
+++ b/challenge-283/pokgopun/python/ch-2.py
@@ -41,8 +41,10 @@ SO WHAT DO YOU THINK ?
### solution by pokgopun@gmail.com
def dcv(ints):
- idx = range(len(ints))
- return set((i,ints.count(i)) for i in idx) == set((i,ints[i]) for i in idx)
+ for i in range(len(ints)):
+ if ints.count(i) != ints[i]:
+ return False
+ return True
import unittest