The shorter, the simpler. With this problem, you should be convinced of this truth. You are given an array A of N postive integers, and M queries in the form (l,r). A function F(l,r) (1≤l≤r≤N) is defined as: F(l,r)={AlF(l,r−1) modArl=r;l<r. You job is to calculate F(l,r), for each query (l,r) . ...