CF1987A Upload More RAM
题目描述
哦不,$ForceCodes$ 服务器内存不足!幸运的是,您可以通过上传一些$ RAM$ 来帮助他们!
您要上传
$?GB$ 的 $RAM$。每秒,您将上传$0$或$1GB$ 内存。但是,您的网络速度是有限制的:在任何对连续秒数,最多只能上传总共 $1GB$ 的 $RAM$。
查找上传所需的最短秒数
$nGB$ 或 $RAM$!
输入格式
每个测试都包含多个测试用例。输入的第一行包含单个整数$?$ ( $ 1\le t \le10^4$ ) —— 测试用例的数量。测试用例的描述如下。
每个测试用例的第一行也是唯一的一行包含两个整数$n$和$k$( $1\le?,k\le100 $) —— 要上传的$GB$数和时间窗口的长度。
输出格式
对于每个测试用例,输出一个整数——上传所需的最小秒数
$nGB$ 或 $RAM$。
说明/提示
In the first test case, you can upload $ 1 $ GB of RAM per second, so to upload $ 5 $ GBs, you need $ 5 $ seconds.
In the second test case, you can upload $ 1 $ GB in the first second, $ 0 $ GBs in the second second, and $ 1 $ GB in the third second, which in total adds up to exactly $ 2 $ GBs of uploaded RAM.
In the third test case, you can upload $ 1 $ GB in the first second, $ 0 $ GBs in the second second, $ 0 $ GBs in the third second, and $ 1 $ GB in the fourth second, which in total adds up to exactly $ 2 $ GBs of uploaded RAM.