当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5321:Beautiful Set

题目描述
I’ve read many problems in my ICPC career, sometimes the meaning of a problem often makes me confused.
When I read a problem more than three times and still can’t get the idea what is the problem saying about, I may become like this

or


I hope you won’t be the above person after you read this problem.
Mr. Zstu and Mr. Hdu get a set of numbers {$A_{1}, A_{2}, ... , A_{n}$}, they have different opinions about the beautiful value of the set.
Mr. Zstu defines the beautiful value like this:
Make the set become a sequence, the beautiful value of the sequence is the sum of all the interval’s gcd(greatest common divisor), and the beautiful value of the set is the sum of the beautiful value of all the possible sequence. For example, set{$1,2,3$} can be six different sequence {$1,2,3$},{$1,3,2$},{$2,1,3$},{$2,3,1$},{$3,1,2$},{$3,2,1$}.


Mr. Hdu defines the beautiful value like this:
For k from 1 to n, choose k numbers of the set, and calculate the gcd of the k numbers. The beautiful value of the k numbers is k * (gcd of the k chosen numbers). The beautiful value of the set is the sum of all of the beautiful value of k numbers.
Which beautiful value is larger, Mr. Zstu and Mr. Hdu invite the judge Mr. Xiasha to help.
Given that both of the value are too big, the stupid Mr. Xiasha mod both of the values by 258280327, so here is the question, which value is bigger after mod operation?

输入解释
There are multiple test cases.
Each test case begins with an integer n$(1 \leq n \leq 100000)$
The next line is n integers $A_{1},A_{2},...,A_{n}$
All of the integers are between 1 and 100000.
输出解释
For each test case, if the beautiful value is equal between Mr. Zstu and Mr. Hdu, output “Equal”, followed the beautiful value , otherwise output the person’s name with bigger beautiful value and followed the beautiful value.
输入样例
2
2 3
1
233
输出样例
Mr. Zstu 12
Equal 233
来自杭电HDUOJ的附加信息
Author ZSTU
Recommend wange2014

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5321

最后修改于 2020-10-25T23:21:40+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 65536/65536K(Java/Others)