diff options
Diffstat (limited to 'progs/a646.py')
-rw-r--r-- | progs/a646.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/progs/a646.py b/progs/a646.py new file mode 100644 index 0000000..450cbd7 --- /dev/null +++ b/progs/a646.py @@ -0,0 +1,11 @@ +def validate(n):
+ for i in range(10):
+ temp = n;
+ count = 0;
+ while (temp):
+ if (temp % 10 == i):
+ count+=1;
+ if (count > i):
+ return False
+ temp //= 10;
+ return True
\ No newline at end of file |