QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#639302#9354. Justifying the ConjectureWood#WA 0ms3580kbC++23501b2024-10-13 18:52:252024-10-13 18:52:30

Judging History

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

  • [2024-10-13 18:52:30]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3580kb
  • [2024-10-13 18:52:25]
  • 提交

answer

#include <bits/stdc++.h>

using i64 = long long;

void solve() {
    int n;
    std::cin >> n;

    if (n == 3) {
        std::cout << "-1\n";
        return;
    }

    if (n % 2) {
        std::cout << 1 << " " << n - 1 << "\n";
    } else {
        std::cout << 2 << " " << n - 2 << "\n";
    }
}
 
int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);

    int T;
    std::cin >> T;

    while (T--) {
        solve();
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3580kb

input:

3
4
6
7

output:

2 2
2 4
1 6

result:

wrong answer y is not a composite number 2