题目连接:http://www.spoj.com/problems/LGLOVE/ 题意:给出n个初始序列a[1],a[2],...,a[n],b[i]表示LCM(1,2,3,...,a[i]),即1~a[i]的最小公倍数 然后给出三种操作,注意:0<=i,j<n 0 i j p :a[i]~a[j]都加上p 1 i j :求LCM(b[i],b[i+1],...,b[j]) 2 i j :求GCD(b[i],b[i+1],...,b[j]) 思路: 求LCM(b[i],b[i+1],...,…