编程介的小学生 2017-09-03 11:00 采纳率: 20.5%
浏览 779
已采纳

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!

  • 写回答

1条回答

  • threenewbee 2017-09-17 14:42
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)