P7009 [CERC2013] Magical GCD

题目描述

The Magical GCD of a nonempty sequence of positive integers is defined as the product of its length and the greatest common divisor of all its elements. Given a sequence $(a_1, \ldots , a_ n)$, find the largest possible Magical GCD of its connected subsequences.

输入格式

输出格式

说明/提示

Time limit: 8000 ms, Memory limit: 1048576 kB. Central Europe Regional Contest (CERC) 2013