It all returns to nothing.

分块思想

[CQOI2007]余数求和

分块思想