diff options
| author | Omar Magdy <omar.professional8777@gmail.com> | 2022-05-06 15:01:38 +0200 |
|---|---|---|
| committer | Omar Magdy <omar.professional8777@gmail.com> | 2022-05-06 15:01:38 +0200 |
| commit | 27b754215ceda985f0f8e3b64ab5c5f8e84ab826 (patch) | |
| tree | ff4bf84b578b8f774612c511c9c4ed4e615683fa /RecursiveDigitSum.py | |
| parent | bfd47647651229dd98734db1b1ef6bdc55dd65d3 (diff) | |
| download | competitive-programming-27b754215ceda985f0f8e3b64ab5c5f8e84ab826.tar.xz competitive-programming-27b754215ceda985f0f8e3b64ab5c5f8e84ab826.zip | |
Solved Combinational lock codeforces
Diffstat (limited to 'RecursiveDigitSum.py')
| -rw-r--r-- | RecursiveDigitSum.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/RecursiveDigitSum.py b/RecursiveDigitSum.py deleted file mode 100644 index 4d7dbd7..0000000 --- a/RecursiveDigitSum.py +++ /dev/null @@ -1,14 +0,0 @@ -x,n = map(int, input().split()) -x = str(x) -x = x * n -print(x) -def recursive_digit_sum(x): - y = 0 - if len(x) == 1: - return x; - else: - for i in x: - y += int(i) - print("y: ", y) - return recursive_digit_sum(str(y)) -print(recursive_digit_sum(x)) |
