#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
ll t, a, b, i;
cin >> t;
while(t--)
{
cin >> a >> b;
ll c = 0;
for(i=1;i<=b;i++)
{
c+=i;
c+=1;
}
cout << a << " " << c << "\n";
}
return 0;
}
#define ll long long int
using namespace std;
int main()
{
ll t, a, b, i;
cin >> t;
while(t--)
{
cin >> a >> b;
ll c = 0;
for(i=1;i<=b;i++)
{
c+=i;
c+=1;
}
cout << a << " " << c << "\n";
}
return 0;
}
Comments
Post a Comment