Skip to content

Commit 7c66e22

Browse files
committed
Runtime: 48 ms (Top 93.88%) | Memory: 17.60 MB (Top 14.01%)
1 parent c76c46a commit 7c66e22

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Runtime: 48 ms (Top 93.88%) | Memory: 17.60 MB (Top 14.01%)
2+
3+
class Solution:
4+
def findTheArrayConcVal(self, nums: List[int]) -> int:
5+
i=0
6+
j=len(nums)-1
7+
res=0
8+
while i<=j:
9+
if i==j:
10+
res+=int(nums[i])
11+
elif i!=j:
12+
res+=int(str(nums[i])+str(nums[j]))
13+
i+=1
14+
j-=1
15+
return res

0 commit comments

Comments
 (0)