编程介的小学生 2017-02-28 14:53 采纳率: 20.5%
浏览 936
已采纳

The King of the Survives

I think every one of you has played Starcraft. In order to simplify, we just consider the five characters:

Armor: the defender's defending ability;

HP: the points of health;

Power: attacker's power at each hit;

Amount: the amount of hitting each time;

Cool: the time between the ending of the attack and the beginning of another, but neglect the time of attacking;
the formula of the damage of each hit

(Power - Armor) * Amount

Each hit cause at least one point of damage. If one's hp<=0, he is dead. After waiting the first Cool time, there will be the first attack.

Input

You're given several cases. Each test case begins with a line contains the name of the unit. The following line contains the five characters of the first unit, followed the second.

HP, Power, Amount, Cool are natural numbers, and Armor is a no negative number. The input is terminated by EOF, and there is a blank line between two cases.

Output

Just Print a single line "name Survive!" if one killed the other, or "All Die!".

Sample Input

Zerging
35 0 6 1 5
Marine
40 0 15 1 6

Zealot
100 2 40 2 8
Zealot2
100 2 40 2 8

Sample Output

Zerging Survive!
All Die!

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-03-06 15:15
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R
  • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
  • ¥15 八路抢答器设计出现故障
  • ¥15 opencv 无法读取视频
  • ¥15 按键修改电子时钟,C51单片机
  • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))