Solution (source code)

= Solution

The permitted zero-count bound $N(T)\ll T\log(T+2)$ implies, by <partial summation>,
$$
\sum_{|\rho|<T}\frac1{|\rho|}\ll\log^2(T+2).
$$
Indeed, the zeros with $|\rho|\leq1$ contribute a bounded amount since $\xi(0)\ne0$; the rest contribute $N(T)/T+\int_1^TN(u)u^{-2}\,du$. For every zero in the sum, the preceding <zero-free region of the Riemann zeta function> gives
$$
x^\beta\leq x\exp\left(-\frac{c\log x}{\log(T+2)}\right).
$$
The supplied <truncated explicit formula for the second Chebyshev function> therefore implies
$$
|\psi(x)-x|\ll
x\exp\left(-\frac{c\log x}{\log(T+2)}\right)\log^2(T+2)
+\frac{x\log^2x}{T}.
$$
Choose $T=\exp(a\sqrt{\log x})$, with any fixed positive $a$ and then, for example, $a=\sqrt c$. Both terms have exponential decay in $\sqrt{\log x}$, and the logarithmic factors can be absorbed by slightly decreasing its coefficient. Hence, for some absolute $b>0$,
$$
\boxed{\psi(x)=x+O\bigl(xe^{-b\sqrt{\log x}}\bigr),\qquad \psi(x)\sim x.}
$$
If the truncated formula is taken only at admissible heights and non-prime-power endpoints, choose such heights of the same size and first apply it at half-integers. Monotonicity and the $O(\log x)$ jump of $\psi$ at an <integer> transfer this bound to all $x$; these convention choices do not change the conclusion.

To pass from <prime powers> to <primes>, let $\vartheta(x)=\sum_{p\leq x}\log p$. The higher prime-power contribution satisfies
$$
0\leq\psi(x)-\vartheta(x)
=\sum_{k\geq2}\sum_{p\leq x^{1/k}}\log p
\ll\sqrt x\log^2x=o(x).
$$
Thus $\vartheta(x)\sim x$. Apply <partial summation> again:
$$
\pi(x)=\frac{\vartheta(x)}{\log x}
+\int_2^x\frac{\vartheta(t)}{t\log^2t}\,dt.
$$
The integral is $O(x/\log^2x)$: use $\vartheta(t)\ll t$ and split at $\sqrt x$. It is therefore smaller than the first term, which is asymptotic to $x/\log x$. This proves the <Prime number theorem> in the requested form
$$
\boxed{\pi(x)\sim\frac{x}{\log x}.}
$$