验证:哥德巴赫猜想

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <ctime>
#include <cmath>
using namespace std;
typedef unsigned long long  LL;
const int N = 100000,M = 10000,count1 = 10;
int prime1[M], k = 0;
bool book[N];
LL prime[6] = {2, 3, 5, 233, 331};
LL qmul(LL x, LL y, LL mod) { 
    return (x * y - (long long)(x / (long double)mod * y + 1e-3) *mod + mod) % mod;
}
LL qpow(LL a, LL n, LL mod) {
    LL ret = 1;
    while(n) {
        if(n & 1) ret = qmul(ret, a, mod);
        a = qmul(a, a, mod);
        n >>= 1;
    }
    return ret;
}
bool Miller_Rabin(LL p) {
    if(p < 2) return 0;
    if(p != 2 && p % 2 == 0) return 0;
    LL s = p - 1;
    while(! (s & 1)) s >>= 1;
    for(int i = 0; i < 5; ++i) {
        if(p == prime[i]) return 1;
        LL t = s, m = qpow(prime[i], s, p);
        while(t != p - 1 && m != 1 && m != p - 1) {
            m = qmul(m, m, p);
            t <<= 1;
        }
        if(m != p - 1 && !(t & 1)) return 0;
    }
    return 1;
}
//以上均为米勒罗宾模板
void init()
{
    for(int i = 2; i < N; ++i){
        if(book[i]==false){
            prime1[k++] = i;
        }
        for(int j = 2; i*j <= N; ++j){
            if(book[i*j]==false)
            book[i*j] = true;
        }
    }
}
int main(){
    init();
    int t;
    LL n;
    cin>>t;
    while(t--){
        scanf("%llu",&n);
        int flag = 0;
        for(int i = 0; i < k; ++i){
            if(n-prime1[i]>=0&&Miller_Rabin(n-prime1[i])){
                printf("%d %llu\n",prime1[i],n-prime1[i]);
                flag = 1;
                break;
            }
        }
    }
    return 0;
}