1. Given that $n$ is a positive integer. Find the smallest positive integer $k$ such that for any real numbers $a_{1}, a_{2}, \cdots, a_{d}$, and
$$
a_{1}+a_{2}+\cdots+a_{d}=n\left(0 \leqslant a_{i} \leqslant 1, i=1,2, \cdots, d\right) \text {, }
$$
it is always possible to partition these numbers into $k$ groups (some groups may be empty) such that the sum of the numbers in each group is at most 1.
1. $k=2 n-1$.

If $d=2 n-1$, and
$$
a_{1}=a_{2}=\cdots=a_{2 n-1}=\frac{n}{2 n-1} \text {. }
$$

Since $\frac{2 n}{2 n-1}>1$, for any partition satisfying the condition, there is at most one number in each group.
Therefore, $k \geqslant 2 n-1$.
Next, we prove that it is possible to partition into $2 n-1$ groups satisfying the condition.
We use mathematical induction on $d$.
For $d \leqslant 2 n-1$, it is easy to see that the conclusion holds.
Assume the conclusion holds for $d-1$.
For $d \geqslant 2 n$, since
$$
\left(a_{1}+a_{2}\right)+\left(a_{3}+a_{4}\right)+\cdots+\left(a_{2 n-1}+a_{2 n}\right) \leqslant n,
$$

there exist two numbers $a_{i} 、 a_{i+1}(i \in\{1,3, \cdots, 2 n-1\})$, such that $a_{i}+a_{i+1} \leqslant 1$.
Consider the sum of these two numbers as a new number $a_{i}+a_{i+1}$.
By the induction hypothesis, there exists a partition satisfying the condition for $d-1$ numbers
$$
a_{1}, a_{2}, \cdots, a_{i-1}, a_{i}+a_{i+1}, a_{i+2}, \cdots, a_{d}
$$

In such a partition, consider $a_{i}+a_{i+1}$ as the sum of two numbers, which is a partition satisfying the condition for $a_{1}, a_{2}, \cdots, a_{d}$.