diff --git a/solved/Codeforces/Codeforces Round 961 (Div. 2)/A.cc b/solved/Codeforces/Codeforces Round 961 (Div. 2)/A.cc new file mode 100644 index 00000000..3f7105dc --- /dev/null +++ b/solved/Codeforces/Codeforces Round 961 (Div. 2)/A.cc @@ -0,0 +1,31 @@ +#include + +using namespace std; + +int main() { + int tc; + cin >> tc; + while (tc--) { + int n, k; + cin >> n >> k; + int ans = 0; + if (k != 0) { + ans++; + k -= n; + n--; + while (k > 0) { + ans++; + k -= n; + if (k <= 0) { + break; + } + ans++; + k -= n; + n--; + } + } + assert(k <= 0); + cout << ans << endl; + } + return 0; +} \ No newline at end of file