Given $m\in\mathbb{Z}^+$. Find all natural numbers $n$ that does not exceed $10^m$ satisfying the following conditions:
i) $3|n.$
ii) The digits of $n$ in decimal representation are in the set $\{2,0,1,5\}$.
1. **Define the polynomial and its properties:**
   We start by considering the polynomial \( P(x) = (x^2 + x^0 + x^1 + x^5)^k \). This polynomial represents the generating function for the digits of \( n \) in the set \(\{2, 0, 1, 5\}\).

2. **Identify the coefficients:**
   The coefficients \( a_i \) in the expansion \( P(x) = \sum a_i x^i \) represent the number of ways to form numbers with the given digits such that the sum of the digits equals \( i \).

3. **Condition for divisibility by 3:**
   We need to find the number of natural numbers \( n \) such that \( 3 \mid n \). This corresponds to finding the sum of coefficients \( a_i \) where \( i \) is a multiple of 3. Let \( A = \sum a_{3m} \).

4. **Using roots of unity:**
   Let \(\epsilon\) be a primitive 3rd root of unity, satisfying \(\epsilon^3 = 1\) and \(1 + \epsilon + \epsilon^2 = 0\). We use the fact that evaluating the polynomial at the roots of unity helps isolate the coefficients of terms where the exponent is a multiple of 3.

5. **Evaluate the polynomial at roots of unity:**
   \[
   P(1) + P(\epsilon) + P(\epsilon^2) = \sum a_i 1^i + \sum a_i \epsilon^i + \sum a_i \epsilon^{2i}
   \]
   Since \(\epsilon^3 = 1\), the sums \(\sum a_i \epsilon^i\) and \(\sum a_i \epsilon^{2i}\) will cancel out all terms except those where \(i\) is a multiple of 3.

6. **Simplify the expression:**
   \[
   P(1) + P(\epsilon) + P(\epsilon^2) = 3 \sum a_{3m}
   \]
   Therefore,
   \[
   3A = P(1) + P(\epsilon) + P(\epsilon^2)
   \]

7. **Calculate \( P(1) \), \( P(\epsilon) \), and \( P(\epsilon^2) \):**
   \[
   P(1) = (1^2 + 1^0 + 1^1 + 1^5)^k = 4^k
   \]
   \[
   P(\epsilon) = (\epsilon^2 + 1 + \epsilon + \epsilon^5)^k = (\epsilon^2 + 1 + \epsilon + \epsilon^2)^k = (\epsilon^2 + \epsilon^2 + \epsilon + 1)^k = (\epsilon^2 + \epsilon + 1 + 1)^k = 0^k = 0
   \]
   \[
   P(\epsilon^2) = (\epsilon^4 + 1 + \epsilon^2 + \epsilon^{10})^k = (\epsilon + 1 + \epsilon^2 + \epsilon^2)^k = (\epsilon + 1 + 1 + \epsilon^2)^k = 0^k = 0
   \]

8. **Combine the results:**
   \[
   3A = 4^k + 0 + 0 = 4^k
   \]
   \[
   A = \frac{4^k}{3}
   \]

9. **Determine the form of \( A \):**
   Depending on \( k \mod 3 \):
   - If \( k \equiv 0 \pmod{3} \), then \( 4^k \equiv 1 \pmod{3} \), so \( A = \frac{4^k + 2}{3} \).
   - If \( k \equiv 1 \pmod{3} \) or \( k \equiv 2 \pmod{3} \), then \( 4^k \equiv 1 \pmod{3} \), so \( A = \frac{4^k - 1}{3} \).

The final answer is \( \boxed{ A = \frac{4^k - 1}{3} } \) for \( k \equiv 1,2 \pmod{3} \) and \( A = \frac{4^k + 2}{3} \) for \( 3 \mid k \).