Source Code
/*
     Author: Asmaa Raafat
*/
/////////////////////////////"THINK TWICE... CODE ONCE"/////////////////////////////////.
#include <bits/stdc++.h>
#define ll long long
#define fast ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
int main()
{
    #ifndef ONLINE_JUDGE
    //freopen("primes.in", "r", stdin);
    #endif
    fast;
    int t;
    cin>>t;
    while(t--)
    {
        int n, k;
        cin>>n>>k;
        cout<<k/2<<endl;
    }
}
/* stuff you should look for
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* WRITE STUFF DOWN
	* DON'T GET STUCK ON ONE APPROACH
*/
Copy
Ramadan Candies asmaa_raafat
GNU G++17
35 ms
444 KB
Accepted