/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Wrong Answer 2ms 320.0 KiB
#3 Wrong Answer 2ms 532.0 KiB
#4 Wrong Answer 2ms 536.0 KiB
#5 Wrong Answer 3ms 576.0 KiB
#6 Wrong Answer 21ms 648.0 KiB
#7 Wrong Answer 192ms 1.484 MiB
#8 Wrong Answer 191ms 1.312 MiB
#9 Wrong Answer 191ms 1.488 MiB
#10 Wrong Answer 188ms 708.0 KiB
#11 Wrong Answer 202ms 1.25 MiB

Code

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define pb push_back
#define vi vector<int>
#define vll vector<ll>
#define mp make_pair
#define pq priority_queue<int>
#define pi pair<int, int>
#define pll pair<ll, ll>
#define all(x) (x).begin(), (x).end()
#define f(i, n) for (int i = 0; i < n; i++)
#define PI acos(-1)
const int M = 1e9 + 7;
ll binExp(ll a, ll b)
{
    int res = 1;
    while (b)
    {
        if (b & 1)
            res = res * a;
        a *= a;
        b /= 2;
    }
    return res;
}
ll gcd(ll a, ll b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}
ll lcm(ll a, ll b)
{
    return (a / gcd(a, b)) * b;
}
ll n, k;
bool fun(ll d)
{
    return (k - d * n) >= n;
}
void solve()
{
    cin >> n >> k;
    cout << (k / n) * (k % n) << endl;
}
int32_t main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while (t--)
    {
        solve();
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1092 Bitwise AND
Contest
Brain Booster #5
Language
C++20 (G++ 13.2.0)
Submit At
2024-09-05 16:38:06
Judged At
2024-10-03 13:06:41
Judged By
Score
1
Total Time
202ms
Peak Memory
1.488 MiB