Skip to content

Commit e5eaa7b

Browse files
committed
Added 1660A - Vasya and Coins.cpp
1 parent 7b50b68 commit e5eaa7b

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

1660A - Vasya and Coins.cpp

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// ॐ नमः शिवाय
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
5+
#define ll long long
6+
#define pb push_back
7+
#define ff first
8+
#define ss second
9+
#define mp make_pair
10+
11+
// Code Written By: Vikash Patel
12+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
13+
14+
int solve(int a, int b)
15+
{
16+
if(a == 0)
17+
return 1;
18+
else
19+
return a*1+b*2+1;
20+
}
21+
22+
int main()
23+
{
24+
ios_base::sync_with_stdio(0);
25+
cin.tie(0);
26+
cout.tie(0);
27+
28+
// #ifndef ONLINE_JUDGE
29+
// freopen("input.txt", "r", stdin);
30+
// freopen("/Users/vikash/Desktop/output.txt", "w", stdout);
31+
// #endif
32+
33+
int t;
34+
cin>>t;
35+
while(t--)
36+
{
37+
int a, b;
38+
cin>>a>>b;
39+
cout<<solve(a, b)<<endl;
40+
}
41+
return 0;
42+
}

0 commit comments

Comments
 (0)