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

建议使用的浏览器:

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

5186:zhx's submissions

题目描述
As one of the most powerful brushes, zhx submits a lot of code on many oj and most of them got AC.
One day, zhx wants to count how many submissions he made on $n$ ojs. He knows that on the $i^{th}$ oj, he made $a_i$ submissions. And what you should do is to add them up.
To make the problem more complex, zhx gives you $n$ $B-base$ numbers and you should also return a $B-base$ number to him.
What's more, zhx is so naive that he doesn't carry a number while adding. That means, his answer to $5 + 6$ in $10-base$ is $1$. And he also asked you to calculate in his way.
输入解释
Multiply test cases(less than $1000$). Seek $EOF$ as the end of the file.
For each test, there are two integers $n$ and $B$ separated by a space. ($1 \leq n \leq 100$, $2 \leq B \leq 36$)
Then come n lines. In each line there is a $B-base$ number(may contain leading zeros). The digits are from $0$ to $9$ then from $a$ to $z$(lowercase). The length of a number will not execeed 200.
输出解释
For each test case, output a single line indicating the answer in $B-base$(no leading zero).
输入样例
2 3
2
2
1 4
233
3 16
ab
bc
cd
输出样例
1
233
14
来自杭电HDUOJ的附加信息
Recommend hujie

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

题目来源 BestCoder Round #33

源链接: HDU-5186

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

共提交 0

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