The Vita Sum: TCS: Codevita

Can someone tell me how to approach this problem for N=1000,000,000 ?

1 Like