Why My Solution is partially accepted


#1

Here is my code

   string Solution::multiple(int A) {
    if(A == 1)
      return "1";
    vector<string> Dp(A);
    Dp[1] = "1";
    queue<int> bfs;
    bfs.push(1);
    while(!bfs.empty())
    {
        int r = bfs.front();
        bfs.pop();
        if(r == 0)
        {
            return Dp[r];
        }
        for(int digit : {0,1})
        {
            int new_r = (r*10+digit) % A;
            if(Dp[new_r].empty())
            {
                bfs.push(new_r);
                Dp[new_r] = Dp[r] + char('0' + digit);
            }
        }
    }
    return "";
}

#2

same issue :confused: