let Dx number positive divisor positive integer x for example D22 2 divisible 1 2 d64 6 divisible 1 2 3 6you give array n integer you process type query REPLACE l r replace ai Dai SUM l r calculate Print answer SUM query