title: Number with n digits divisible by given number
body: <p>i need to find ANY number >0 with n digits(&lt;=10) divisible by a number m (&lt;=10 also). </p>
  
  <p>This is what i tried:</p>
  
  <pre><code>#include &lt;bits/stdc++.h&gt;
  using namespace std;
  
  int main() {
      int n, t, k, r=1;
      cin&gt;&gt;n&gt;&gt;t;
      k=n;
      while(k--)
          r*=10;  // i am making 10^n
      r/=10;      // a 0 was in plus
  </code></pre>
  
  <p>Now I search from 10^n to 10^n + 10 a number that is divisible by t, knowing that I have t&lt;=10, i should have a number divisible by it.</p>
  
  <pre><code>    for(int i=r; i&lt;=r+10; ++i)
      if(i%t==0){
              cout&lt;&lt;i;
              return 0;
      }
  }
  </code></pre>
  
  <p>I only got this example:</p>
  
  <pre><code>3 2
  </code></pre>
  
  <p>And the answer is 712 but i can output any.</p>
  
  <p>For an input my code is wrong, i don't know why.</p>