http://acm.hdu.edu.cn/showproblem.php?pid=5066
中学物理题
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <queue>
#include <map>
#include <iostream>
#include <algorithm>
using namespace std;
#define RD(x) scanf("%d",&x)
#define RD2(x,y) scanf("%d%d",&x,&y)
#define RD3(x,y,z) scanf("%d%d%d",&x,&y,&z)
#define clr0(x) memset(x,0,sizeof(x))
#define eps 1e-9
const double pi = acos(-1.0);
typedef long long LL;
const int modo = 1e9 + 7;
const int maxn = 1e6 + 5,maxm = 1e4 + 5;
int v0,v;
int main() {
while(~RD2(v,v0)){
v<<=1;
printf("%d\n",v-v0);
}
return 0;
}