ZOJ Fiddlesticks (简单模拟)

该博客介绍了一种流行的LOL英雄Fiddlesticks的攻击策略。当使用其三技能时,Fiddlesticks召唤的乌鸦会按顺序攻击敌人,每次造成一定伤害。如果所有敌人被击败,乌鸦也会消失。文章给出了一个模拟攻击过程的问题,要求计算乌鸦最后攻击的敌人的编号。输入包括测试用例数量、敌人数量、乌鸦的伤害值以及每个敌人的生命值,输出为最后被攻击的敌人编号。
摘要由CSDN通过智能技术生成

Fiddlesticks is a popular hero in LOL. When he uses third skill, he can summon a crow to attack one enemy while causing damage to the enemy. And then, the crow will attack another enemy. Now there are n enemies. Their HP respectively are a1,a2,a3,...,an. The crow can attack enemies for n+5 times in total. If all enemies are killed, the crow will also disappear.

Being attacked means the enemy's HP minus crow's damage. If a enemy's HP is not larger than 0, the enemy will be removed from the game. In other word, the enemy is killed.

Fiddlesticks always let the crow attack the first enemy firstly. And the crow will attack the second enemy secondly. One by one,1st to nth enemy will be attacked

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值