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

建议使用的浏览器:

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

1703:PBD

题目描述
PrisonBreak is a popular TV programme in HDU. ACboy likes it very much, and he join a PrisonBreak discussing team called "PBD".Every Tuesday night, a lot of PBDers will contact with each other to discuss the newest plot of PrisonBreak season2. Generally speaking, every PBDer has distinct ideas about the play, so everyone want to know all the others' ideas. For example, when ACboy contract with Sam, ACboy will tell all the ideas he konws to Sam, and Sam will also tell all the ideas he konws to ACboy, and the call costs 5 yuan.
If there are N people in the "PBD" team, what is the minimum cost to let everyone knows all the others' ideas?
输入解释
The input contains multiple test cases.
Each test case contains a number N, means there are N people in the "PBD" team.N = 0 ends the input.(A call cost 5 yuan).
输出解释
for each case, output a integer represent the minimum cost to let everyone knows all the others' ideas.
输入样例
1
2
3
4
0
输出样例
0
5
15
20

提示
If there are 2 people, for example, named A, B. Then A calls B, then A and B will know each other's ideas, so it only
 needs one call, so the minimum cost is 1*5 = 5 yuan.
来自杭电HDUOJ的附加信息
Recommend lcy

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

源链接: HDU-1703

最后修改于 2020-10-25T22:47:22+00:00 由爬虫自动更新

共提交 0

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