/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Wrong Answer 1ms 324.0 KiB
#3 Wrong Answer 1ms 320.0 KiB

Code

#include <bits/stdc++.h>

using namespace std;
using i64 = long long;

void solve() {
    int n, k; cin >> n >> k;
    int m = (k + 2 * n - 1) / (2 * n);
    cout << k * m - m * m * n << '\n';
}

signed main()
{
    ios::sync_with_stdio(false); cin.tie(nullptr);
    i64 T; cin >> T;
    while(T--) solve();
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1092 Bitwise AND
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-03 17:48:39
Judged At
2024-11-11 02:45:36
Judged By
Score
1
Total Time
1ms
Peak Memory
324.0 KiB