Remove a Progression
题意翻译
## 题目描述
你有一段从 $1$ 到 $n$ 的正整数序列
你会对这个序列进行若干次操作,对于第 $i$ 次操作,你将会擦去在当前序列中第 $i$ 个数 (仅考虑未被擦去的数)。当序列的长度不足 $i$ 时,停止操作
你的任务是求出在所有操作结束后,第 $x$ 个数的值
## 输入输出格式
### 输入格式
多组数据
第一行包括一个正整数 $T (1 \leq T \leq 100)$,描述了数据的组数
在接下来的 $T$ 行中,每行包括两个整数 $n, x (1 \leq x < n \leq 10^9)$,意义如上所述
### 输出格式
对于每组数据,输出一行,要求如上所述
题目描述
You have a list of numbers from $ 1 $ to $ n $ written from left to right on the blackboard.
You perform an algorithm consisting of several steps (steps are $ 1 $ -indexed). On the $ i $ -th step you wipe the $ i $ -th number (considering only remaining numbers). You wipe the whole number (not one digit).
![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1194A/1fef43ef3a7703b133fc5ede3191b9094cf55aaa.png)When there are less than $ i $ numbers remaining, you stop your algorithm.
Now you wonder: what is the value of the $ x $ -th remaining number after the algorithm is stopped?
输入输出格式
输入格式
The first line contains one integer $ T $ ( $ 1 \le T \le 100 $ ) — the number of queries. The next $ T $ lines contain queries — one per line. All queries are independent.
Each line contains two space-separated integers $ n $ and $ x $ ( $ 1 \le x < n \le 10^{9} $ ) — the length of the list and the position we wonder about. It's guaranteed that after the algorithm ends, the list will still contain at least $ x $ numbers.
输出格式
Print $ T $ integers (one per query) — the values of the $ x $ -th number after performing the algorithm for the corresponding queries.
输入输出样例
输入样例 #1
3
3 1
4 2
69 6
输出样例 #1
2
4
12