結果

問題 No.3030 ミラー・ラビン素数判定法のテスト
ユーザー りすりす/TwoSquirrelsりすりす/TwoSquirrels
提出日時 2023-08-13 18:23:36
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 346 ms / 9,973 ms
コード長 294 bytes
コンパイル時間 4,482 ms
コンパイル使用メモリ 393,116 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-01 11:01:31
合計ジャッジ時間 6,226 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,248 KB
testcase_02 AC 2 ms
5,248 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 183 ms
5,376 KB
testcase_05 AC 193 ms
5,376 KB
testcase_06 AC 84 ms
5,376 KB
testcase_07 AC 81 ms
5,376 KB
testcase_08 AC 83 ms
5,376 KB
testcase_09 AC 346 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <boost/multiprecision/miller_rabin.hpp>
using namespace std;
namespace mp = boost::multiprecision;

int main() {
  int n;
  cin >> n;
  while (n--) {
    long long int a_i;
    cin >> a_i;
    cout << a_i << " " << mp::miller_rabin_test(a_i, 8) << "\n";
  }
}
0