hdoj Harry And Physical Teacher 5066 (数学思想)
来源:互联网 发布:js判断android版本号 编辑:程序博客网 时间:2024/06/05 17:10
Harry And Physical Teacher
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 564 Accepted Submission(s): 304
Problem Description
As we all know, Harry Porter learns magic at Hogwarts School. However, learning magical knowledge alone is insufficient to become a great magician. Sometimes, Harry also has to gain knowledge from other certain subjects, such as language, mathematics, English, and even algorithm.
Today, Harry's physical teacher set him a difficult problem: if a small ball moving with a speedV0 made a completely elastic collision with a car moving towards the same direction with a speedV(V<V0) , and the car far outweighs the ball, what was the speed of the small ball after the collision?
This problem was so difficult that Harry hasn't figure out how to solve it. Therefore, he asks you for help. Could you do him this favor?
Today, Harry's physical teacher set him a difficult problem: if a small ball moving with a speed
This problem was so difficult that Harry hasn't figure out how to solve it. Therefore, he asks you for help. Could you do him this favor?
Input
They are several test cases, you should process to the end of file.
There are two integersV and V0 for each test case. All the integers are 32-bit signed non-negative integers.
There are two integers
Output
For each test case, just output one line that contains an integer indicate the speed of the small ball after the collision.
Sample Input
0 10
Sample Output
-10#include<stdio.h>#include<string.h>#define ll long long#include<algorithm>using namespace std;int main(){ll n,m;while(scanf("%lld%lld",&n,&m)!=EOF){ll x=n-m+n;printf("%lld\n",x);}return 0;}
0 0
- hdoj Harry And Physical Teacher 5066 (数学思想)
- HDOJ 5066 Harry And Physical Teacher
- hdu 5066 Harry And Physical Teacher(数学)
- HDU 5066Harry And Physical Teacher(数学)
- HDU 5066 Harry And Physical Teacher(物理题)
- hdu 5066 Harry And Physical Teacher(物理)
- HDU 5066 Harry And Physical Teacher 物理
- HDU 5066 Harry And Physical Teacher
- HDU 5066 Harry And Physical Teacher
- HDU5066-Harry And Physical Teacher
- hdu 5066 Harry And Physical Teacher(Bestcoder Round #14)
- hdu 5066 Harry And Physical Teacher(物理题 弹性碰撞)
- hdu5066——Harry And Physical Teacher(物理)
- HDU 5066 Harry And Physical Teacher(物理 动量守恒 动能守恒)——BestCoder Round #14
- Bestcoder Round 14# 1001 Harry And Physical Teacher
- BestCoder Round #14 A题 Harry And Physical Teacher
- 【线段树】 HDOJ 5068 Harry And Math Teacher
- 【AC自动机】 HDOJ 5069 Harry And Biological Teacher
- 解决Ubuntu下Sublime Text 3无法输入中文
- java开发时内存溢出问题
- 软件行业里常说的“架构”
- iOS下的实际网络连接状态检测
- C语言内存四区
- hdoj Harry And Physical Teacher 5066 (数学思想)
- 项目部署、配置、查错常用到的Linux命令
- 论文中如何画出好看的图
- 九度1001,习题记录
- C++习题2——栈(简单)
- Android之多种Bitmap效果
- 鸟哥的Linux私房菜(服务器)- 第十九章、主机名控制者: DNS 服务器
- setFocus不能生效的问题
- 面试题(一)