-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUpload_more_ram.cpp
57 lines (45 loc) · 1.12 KB
/
Upload_more_ram.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
///link of problem : https://codeforces.com/contest/1987/problem/A
#include<bits/stdc++.h>
#include<iostream> ///* code by Ahmed Elnemr *///
using namespace std;
///template<typename type1,typename type2>
///#define b 10 --> const int b= 10;
#define int long long
#define ll long long
#define f first
#define sec second
#define endl "\n"
#define lp(st,nd) for(ll i=st;i<nd;i++)
#define lp2(st,nd) for(ll j=st;j<nd;j++)
#define sp(n) fixed<<setprecision(n)
#define iset set<int>
#define llset set<ll>
#define chset set<char>
#define ivec vector<int>
#define llvec vector<ll>
#define iimap map<int,int>
#define chimap map<char,int>
#define chchmap map<char,char>
#define all(x) x.begin(),x.end()
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define igrid vector<vector<int>>
#define llgrid vector<vector<ll>>
void fast_IO()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
signed main() {
fast_IO();
int t=1;
cin>>t;
while(t--) {
int x=1e9,ans=0,n,k; cin>>n>>k;
n--;
ans=n*k+1;
cout<<ans<<endl;
}
return 0;
}