QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#818505#9670. GG and YY’s Stone GamewcyQwQCompile Error//C++14531b2024-12-17 21:14:282024-12-17 21:14:29

Judging History

你现在查看的是最新测评结果

  • [2024-12-17 21:14:29]
  • 评测
  • [2024-12-17 21:14:28]
  • 提交

answer

#include <bits/stdc++.h>
#define L(i, j, k) for (int i = (j); i <= (k); i++)
#define R(i, j, k) for (int i = (j); i >= (k); i--)
#define all(x) x.begin(), x.end()
#define eb emplace_back

using namespace std;
using LL = long long;

namespace FloatingMoon {
  void main() {
    int T;
    cin >> T;
    while (T--) {
      LL n;
      cin >> n;
      cout << !!(n % 3) << ' ' (n % 3 == 0 ? 1 : n % 3) << '\n';
    }
  }
}

int main() {
  cin.tie(0)->sync_with_stdio(0);
  FloatingMoon::main();
  return 0;
}

Details

answer.code: In function ‘void FloatingMoon::main()’:
answer.code:17:32: error: expression cannot be used as a function
   17 |       cout << !!(n % 3) << ' ' (n % 3 == 0 ? 1 : n % 3) << '\n';
      |                            ~~~~^~~~~~~~~~~~~~~~~~~~~~~~