Sort by

recency

|

8 Discussions

|

  • + 0 comments

    Thanks for providing solution for this. Change my life spell

  • + 0 comments

    Got it easily , share some more problems to so that I can easily tackle them.... wazifa for husband to come back

  • + 1 comment

    Anyone can help me for optimizing this code?

    def solve(p, s, queries):
        bigNumber = str(s)
        count=0
        result = []
        for i in queries:
            count=0
            q=i[1]+2-i[0]
            for j in range(i[0],i[1]+1):
                for k in range(1,q):
                    if (int(bigNumber[j-1:j+k-1]))%p==0:
                        count+=1
                q-=1
            result.append(count)
        return result
    
  • + 1 comment

    sorry, I forgot what I wrote. seeing upvotes to my http://tanktrouble.xyz it looks there are enough clues, try once again carefully reading my comment above if you have time)

  • + 0 comments

    This is question to author. I think there is a problem in description: "1<=b<=e<=N". There is no N in a text. What is the limit for b and e: P (10^9) or size of S (10^6)? I guess it's 10^6, but want to be clear