We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Sam and substrings
Sam and substrings
Sort by
recency
|
213 Discussions
|
Please Login in order to post a comment
Solution in Python3:
JAVA SOLUTION
My code: def substrings(n): arr=[int(x) for x in n] _sum=0 for i in range(len(arr)): print(arr[i]) for k in range(len(arr)-i, 0, -1): _sum+=_mod(arr[i]10*(k-1)*(i+1)) return _mod(_sum)
What are the substrings of 1111?