結果

問題 No.8030 ミラー・ラビン素数判定法のテスト
ユーザー ninoinui
提出日時 2020-09-26 09:16:02
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 419 ms / 9,973 ms
コード長 326 bytes
コンパイル時間 3,894 ms
コンパイル使用メモリ 386,356 KB
最終ジャッジ日時 2025-01-14 22:02:41
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

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

#include <boost/multiprecision/miller_rabin.hpp>
#include <boost/random/mersenne_twister.hpp>
using namespace boost::multiprecision;
boost::random::mt19937 gen;

int main() {
  long N, X;
  cin >> N;
  while (cin >> X) cout << X << " " << miller_rabin_test(X, 10, gen) << "\n";
}
0