QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#117652 | #6563. Four Square | cada_dia_mas_insanos# | WA | 1ms | 3316kb | C++14 | 747b | 2023-07-01 21:39:46 | 2023-07-01 21:39:53 |
Judging History
answer
/**
@author: Cada día más insanos
@url: https://qoj.ac/contest/1248/problem/6558
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
#define ff first
#define ss second
#define endl "\n"
void fast_io() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
const ll INF = 1e18+5, MOD = 1e9+7, NMAX = -1;
ll t, n, k, d;
int main() {
/*//
freopen("entrada.in", "r", stdin);
freopen("salida.out", "w", stdout);
//*/
cin >> t;
while (t--) {
cin >> n >> d;
if ((n-1LL)%(d+1LL) == 0) cout << (n-1LL)/(d+1LL) << endl;
else cout << (n-1LL)/(d+1LL) + 1LL << endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3316kb
input:
1 1 1 1 1 1 1 1
output:
0
result:
wrong answer 1st lines differ - expected: '1', found: '0'