/ SeriousOJ /

Record Detail

Compile Error

foo.cc: In function 'void sir()':
foo.cc:7:12: error: 'll' was not declared in this scope
    7 | #define ll ll
      |            ^~
foo.cc:22:5: note: in expansion of macro 'll'
   22 |     ll N, K;
      |     ^~
foo.cc:23:12: error: 'N' was not declared in this scope
   23 |     cin >> N >> K;
      |            ^
foo.cc:23:17: error: 'K' was not declared in this scope
   23 |     cin >> N >> K;
      |                 ^
foo.cc:25:8: error: expected ';' before 'ans'
   25 |     ll ans = K / N;
      |        ^~~
foo.cc:26:8: error: expected ';' before 'X'
   26 |     ll X = K - ans * N;
      |        ^
foo.cc:27:8: error: expected ';' before 'Y'
   27 |     ll Y = ans;
      |        ^
foo.cc:29:13: error: 'X' was not declared in this scope
   29 |     cout << X * Y << "\n";
      |             ^
foo.cc:29:17: error: 'Y' was not declared in this scope
   29 |     cout << X * Y << "\n";
      |                 ^
foo.cc: In function 'int main()':
foo.cc:7:12: error: 'll' was not declared in this scope
    7 | #define ll ll
      |            ^~
foo.cc:35:5: note: in expansion of macro 'll'
   35 |     ll t = 1;
      |     ^~
foo.cc:36:10: error: 't' was not declared in this scope; did you mean 'tm'?
   36 |     cin>>t;
      |          ^
      |          tm

Code

/*
 *Copyright (c) Swadheen Islam Robi (SIR01)
 *Created on Thu Sep 05 2024 9:34:48 PM
 */
#include <bits/stdc++.h>
using namespace std;
#define ll ll
#define ld long double
#define pie 2*(acos(0.0))
#define yes cout<<"YES\n"
#define no cout<<"NO\n"
#define pb push_back
#define endl "\n"
#define lcm(a,b) (a*b)/(__gcd<ll>(a,b))
#define mod 1000000007
#define srt(v) sort(v.begin(),v.end())
#define rsrt(v) sort(v.rbegin(),v.rend())
#define ALLAHU_AKBAR ios::sync_with_stdio(false); cin.tie(nullptr);

void sir()
{
    ll N, K;
    cin >> N >> K;
        
    ll ans = K / N;
    ll X = K - ans * N;
    ll Y = ans;
    
    cout << X * Y << "\n";
}

int main() {
    ALLAHU_AKBAR

    ll t = 1;
    cin>>t;
    while(t--)
    {
        sir();
    }
    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:37:20
Judged At
2024-10-03 13:06:45
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes