Solution (source code)

= Solution
{c}

The discounted stock over the remaining horizon satisfies
$$
e^{-r\tau}S_T=s+\sigma\int_t^T e^{-r(u-t)}\,dW_u^{\mathbb Q}.
$$
The <Itô integral> on the right is a centered <normal random variable> with <variance> $a_\tau=(1-e^{-2r\tau})/(2r)$. Therefore $\mathbb Q(S_T\geq0\mid S_t=s)=\Phi(d)$, where $d=s/(\sigma\sqrt{a_\tau})$. The <digital option> price and its <option delta> are
$$
\boxed{V(t,s)=e^{-r\tau}\Phi(d),\qquad
\Delta(t,s)=\frac{e^{-r\tau}\phi(d)}{\sigma\sqrt{a_\tau}}.}
$$
The formula also shows $V(t,0)=e^{-r\tau}/2$ for every $t<T$. At maturity use the specified step payoff, including its chosen value one at zero; the terminal discontinuity is not removed by the earlier-time smoothing.