当前位置:网站首页>The two armies clash
The two armies clash
2022-07-29 17:14:00 【seal ink】
两军交锋
话说辽军与MCA相峙多年,终于在一个秋日的早晨爆发了一次大规模的冲突.情况是这样子的,当天上午,由耶律-Pacision领军的辽军忽然带领数万人马浩浩荡荡向MCA山杀来,而这时候驻扎在MCA防守前线的是久经沙场的老将纪哥.纪哥得知这个消息,立刻召集手下精英,前往阻击辽军.现已知辽军前进速度 U 米/秒 ,纪哥 速度 V 米 /秒 ,两军一开始相距L米,战地记者从两军刚开始进军就立刻开始以 W 米/秒的速度马不停蹄地往返于两军之间作第一时间的报道,即一到达一方,立刻返回前往另一方.问,当两军交锋之时,战地记者总共走的路程.
Input
首先输入一个t,表示有t组数据,跟着t行:
每行有四个实数 u ,v , w , l 分别表示辽军速度,纪哥速度,记者速度,以及起始的距离.
Output
输出一行实数表示总的路程.精确到小数点后3位.
Sample Input
1
10 20 30 100
Sample Output
100.000
#include<stdio.h>
int main()
{
int N;
scanf("%d",&N);
while(N--)
{
float u,v,w,l;
scanf("%f %f %f %f",&u,&v,&w,&l);
float t,sum;
u=u+v;
t=l/u;
sum=w*t;
printf("%.3f\n",sum);
}
return 0;
}
边栏推荐
- 特殊的类——集合与泛型(C#)
- Flutter动态化 | Fair 2.6.0 新版本特性
- Twin all things digital visual | join the real world and the digital space
- When to use UserCF and when to use ItemCF?
- wooden stick
- zabbix email sends alert information
- 美国对集成电路及其产品发起337调查:英特尔/联想/宏碁/华硕/微星均涉及其中
- 设置工作模式与环境
- Win10 check sha256
- 718. The longest repeat subarray
猜你喜欢

How should small and medium-sized financial enterprises carry out disaster recovery construction?

如何在C语言中定义自己的数据类型?

Pycaret on diamond data sets using the regression problem

两军交锋
![[Server Storage Data Recovery] A data recovery case of a RAID 5 crash caused by the failure of a certain model of Huawei OceanStor storage RAID 5 hard disk and the failure to synchronize data with the](/img/86/b664e56dff66c57c9f24c850919743.png)
[Server Storage Data Recovery] A data recovery case of a RAID 5 crash caused by the failure of a certain model of Huawei OceanStor storage RAID 5 hard disk and the failure to synchronize data with the

设置工作模式与环境

Dry goods!How to Construct SRv6-TE Performance Test Environment Using Instrumentation

Chicken and rabbit in the same cage

GMAT考什么?

PL5902 SOT-23-5 高效1MHz2A同步DC-DC降压调节器 百盛电子代理商
随机推荐
Automated win training script log
Easy Genes: Human tRNA loci exhibit DNA hypermethylation associated with aging | Research Article
TensorFlow Serving high-performance machine learning model of service system
Staggered question explanation
query词权重, 搜索词权重计算
This article penetrates the architecture design and cluster construction of the distributed storage system Ceph (hands-on)
Twin all things digital visual | join the real world and the digital space
Win10 check sha256
数据库项目01文档:软件测试需要的数据库技能
RocketQA: across batches negative sampling (cross - batch negatives), the denoising of strong negative cases of sampling (denoised hard negative from) and data to enhance (data augment
Chicken and rabbit in the same cage
中芯国际:禁令后全力自救,设备等待期拉长,但没有客户“离开”
718. The longest repeat subarray
Tess4J 图片文字识别
浅谈程序的内存布局
ByteArrayOutputStream 类源码分析
Turbine聚合监控
[网络知识]交换STP
阶乘因式分解
面试官:MySQL如何根据执行计划调优SQL语句?