diff options
| author | Omar Magdy <omar.professional8777@gmail.com> | 2022-04-30 01:13:40 +0200 |
|---|---|---|
| committer | Omar Magdy <omar.professional8777@gmail.com> | 2022-04-30 01:13:40 +0200 |
| commit | a0d7b8320a8996eee0ed957b79c3a882f8b47146 (patch) | |
| tree | 76242ae2b19bad00796ed6d0104da8a0e4a99abe /python/FindDigits.py | |
| download | competitive-programming-a0d7b8320a8996eee0ed957b79c3a882f8b47146.tar.xz competitive-programming-a0d7b8320a8996eee0ed957b79c3a882f8b47146.zip | |
Added all current problems
Diffstat (limited to 'python/FindDigits.py')
| -rwxr-xr-x | python/FindDigits.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/python/FindDigits.py b/python/FindDigits.py new file mode 100755 index 0000000..6bdfebf --- /dev/null +++ b/python/FindDigits.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 + + +def find_digit(n): + count = 0 + list = [int(i) for i in n] + for i in range(len(n)): + if list[i] == 0: + continue + if int(n) % list[i] == 0: + count = count + 1 + return count + +t = int(input()) + +while(t): + t = t - 1; + n = input() + print(find_digit(n)) + + |
