游客 Signup | Login
中文 | En

2445 - a-b

计算– b

Input

输入数据的第一行是一个整数T,表示有T组测试样例,接着是T行数据,每行两个整数ab-100<a,b<100

Output

对于每组测试样例,输出– b的值并独占一行。

Examples

Input

3
2 1
99 99
-3 5

Output

1
0
-8

Solution C

#include<stdio.h>
int main()
{
	int a,b;
	int t;
	scanf("%d",&t);
	while(t--)
	{
		scanf("%d%d",&a,&b);
		printf("%d\n",a-b);
	}
	return 0;
}

Solution C++

#include<iostream>
using namespace std;
int main()
{
  int T;
  cin>>T;
    while(T--)
  {
    int a,b;
    cin>>a>>b;
    cout<<a-b<<endl;
  }
  return 0;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题