iterate over each given query
for ( int i = 0 ; i < q ; i ++ ) { int GCD = answer [ queries [ i ] ] ; Console . Write ( " For ▁ subtree ▁ of ▁ " + queries [ i ] + " , ▁ GCD ▁ = ▁ " + GCD + " STRNEWLINE " ) ; } }