时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒 空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M 64bit IO Format: %lld
题目描述
The musical band Be Geeks! got its name by no accident, as all the members are genuine math geeks. Among others, they love examining various properties of number sequences. Let’s see an example of their subject of interest. Let be a nonempty sequence of positive integers, Let , where . Let , where . Let , where . Let over all pairs of integers . The function gcd stands for the greatest common divisor of the given values. The greatest common divisor of a nonempty sequence of integers is the biggest integer which divides each integer in the sequence evenly.