CF591A Wizards‘ Duel

📋 个人简介

💖大家好,我是2022年3月份新人榜排名第三的 ༺Blog༒Hacker༻
🎉支持我:点赞👍+收藏⭐️+留言📝
💬格言:༺永做优质༒programmer༻
📣 系列专栏:CF & UVA🍁
📝 个人主页:༺Blog༒Hacker༻❄️

在这里插入图片描述

注(具体请见CF665B Shopping):

⚜️我的更新时间会有所改变,每月2-5篇,感谢各位长期以来的支持!
在这里插入图片描述

📣CF591A Wizards’ Duel

❤️题目描述

💮Harry Potter and He-Who-Must-Not-Be-Named engaged in a fight to the death once again. This time they are located at opposite ends of the corridor of length l l l . Two opponents simultaneously charge a deadly spell in the enemy. We know that the impulse of Harry’s magic spell flies at a speed of p p p meters per second, and the impulse of You-Know-Who’s magic spell flies at a speed of q q q meters per second.

💮The impulses are moving through the corridor toward each other, and at the time of the collision they turn round and fly back to those who cast them without changing their original speeds. Then, as soon as the impulse gets back to it’s caster, the wizard reflects it and sends again towards the enemy, without changing the original speed of the impulse.

💮Since Harry has perfectly mastered the basics of magic, he knows that after the second collision both impulses will disappear, and a powerful explosion will occur exactly in the place of their collision. However, the young wizard isn’t good at math, so he asks you to calculate the distance from his position to the place of the second meeting of the spell impulses, provided that the opponents do not change positions during the whole fight.

🧡输入格式

💮The first line of the input contains a single integer l ( 1 < = l < =

  • 7
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

༺Blog༒Hacker༻

您的鼓励将是我更新最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值