Bob is interested in GCDs . Formally, for some positive integers , we denote gcdgcd gcd as the greatest positive integer ddd, such that d∣aid|a_id∣ai for each 1≤i≤k1leq ileq k1≤i≤k. Bob has chosen an interval [l,r][l,r][l,r]. He is going to choose kkk distinct integers from the interval and compute their GCD. There are many integers that can be the final answer, and Bob is curious in the number of such integers. Please write a program to tell him the answer.
Bob is interested in GCDs (Greatest Common Divisors). Formally, for some positive integers (a1,...,ak)(a_1,...,a_k)(a1,...,ak), we denote gcd(a1,...,ak)gcd (a_1,...,a_k)gcd(a1,...,ak) as the greatest positive integer ddd, such that d∣aid|a_id∣ai for each 1≤i≤k1leq ileq k1≤i≤k. Bob has chosen an interval [l,r][l,r][l,r]. He is going to choose kkk distinct integers from the interval and compute their GCD. There are many integers that can be the final answer, and Bob is curious in the number of such integers. Please write a program to tell him the answer.
![HBC237534[JSOI2015]字符串树,可持久化trie树,可持久化数据结构GCD题解
-第1张图片-东莞河马信息技术 HBC237534[JSOI2015]字符串树,可持久化trie树,可持久化数据结构GCD题解
-第1张图片-东莞河马信息技术](https://www.xxstcz.com/zb_users/upload/2023/11/20231120152402170046504234172.jpeg)