编程介的小学生 2019-05-16 21:15 采纳率: 20.5%
浏览 178

最小的花费值的一个运算的编程的实现,怎么利用C语言代码编写的方式呢?

Problem Description
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?

Input
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).

Output
for each case, output a integer represent the minimum cost to let everyone knows all the others' ideas.

Sample Input
1
2
3
4
0

Sample Output
0
5
15
20

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 gradio的web端页面格式不对的问题
    • ¥15 求大家看看Nonce如何配置
    • ¥15 Matlab怎么求解含参的二重积分?
    • ¥15 苹果手机突然连不上wifi了?
    • ¥15 cgictest.cgi文件无法访问
    • ¥20 删除和修改功能无法调用
    • ¥15 kafka topic 所有分副本数修改
    • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
    • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?
    • ¥40 串口调试助手打开串口后,keil5的代码就停止了