Source Code
#include<bits/stdc++.h>
using namespace std;
int main(){
    int t;cin>>t;
    while(t--){
        int n,k;cin>>n>>k;
        cout<<(n*(n+1)/2)/k<<endl;
    }
}
Copy
Ramadan Candies X_404
GNU G++17
1 ms
184 KB
Wrong Answer