We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0e20a3 commit 052faa4Copy full SHA for 052faa4
.sum_pairs.py.swp
-12 KB
ip.txt
@@ -1,7 +1,5 @@
1
2
-5 5 9
3
-1 2 4 5 7
4
-5 6 3 4 8
5
-2 2 3
6
-0 2
7
-1 3
+3
+123
+4
+2563
total_decodings.py
@@ -0,0 +1,25 @@
+#SHIV's code for total decodings
+
+'''
+sample input:
+2
8
9
10
11
12
13
+tn = int(input())
14
15
+def process(num):
16
+ count = 1
17
+ for ind, c in enumerate(num[:-1]):
18
+ if int(c+num[i+1]) <= 26:
19
+ count+=1
20
+ print(count)
21
22
+for i in range(tn):
23
+ ndig = int(input())
24
+ num = input()
25
+ process(num)
0 commit comments