登录
首页 » C/C++ » some-simple-operations-of-link

some-simple-operations-of-link

于 2014-08-12 发布 文件大小:1KB
0 93
下载积分: 1 下载次数: 2

代码说明:

  在洞穴深处,精灵王子不小心触动了洞穴内暗藏的机关,整个洞穴将很快塌陷,精灵王子必 须尽快逃离洞穴。精灵王子的跑步速度为17m/s,以这样的速度可能是无法逃出洞穴的。庆幸的是精灵王子拥有闪烁法术,可在1s内移动60m,不过每次使用闪烁 法术都会消耗魔法值10点。精灵王子的魔法值恢复的速度为4点/s,只有处在原地休息状态时才能恢复。现在已知精灵王子的魔法初值M,他所在洞穴中的位置与 洞穴出口之间的距离S,距离洞穴塌陷的时间T。你的任务是写一个程序帮助精灵王子计算如何在最短的时间内逃离洞穴。(In the depths of the cave, the elven prince accidentally touched a hidden cave organ, the entire cave will soon collapse, elf prince will Must escape from the cave as quickly as possible. Running speed elven prince of 17m/s, at this rate may be unable to escape the cave. Fortunately elven prince has flashes of magic, can move within 60m 1s, but each use flashing Spell will consume mana 10:00. Elf Prince mana recovery speed of 4:00/s, to resume only in situ resting state. Now the magic elf prince known initial value M, the location of the cave where he and Distance between S cave exit from the cave to collapse time T. Your task is to write a program to help calculate how elven prince fled the cave in the shortest possible time)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 104269会员总数
  • 42今日下载