結果
問題 | No.1409 Simple Math in yukicoder |
ユーザー | m_tsubasa |
提出日時 | 2021-02-26 23:17:03 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 469 bytes |
コンパイル時間 | 2,125 ms |
コンパイル使用メモリ | 197,020 KB |
実行使用メモリ | 201,404 KB |
最終ジャッジ日時 | 2023-07-25 23:00:45 |
合計ジャッジ時間 | 64,433 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
7,740 KB |
testcase_01 | AC | 2 ms
4,384 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 2 ms
4,384 KB |
testcase_06 | AC | 1 ms
4,380 KB |
testcase_07 | AC | 547 ms
4,384 KB |
testcase_08 | AC | 1,874 ms
4,380 KB |
testcase_09 | AC | 480 ms
4,376 KB |
testcase_10 | AC | 1,489 ms
4,380 KB |
testcase_11 | AC | 1,849 ms
4,384 KB |
testcase_12 | AC | 1,413 ms
4,384 KB |
testcase_13 | AC | 550 ms
4,380 KB |
testcase_14 | AC | 422 ms
4,380 KB |
testcase_15 | AC | 655 ms
4,380 KB |
testcase_16 | AC | 697 ms
4,376 KB |
testcase_17 | TLE | - |
testcase_18 | AC | 1,219 ms
4,384 KB |
testcase_19 | AC | 1,306 ms
4,376 KB |
testcase_20 | AC | 1,054 ms
4,380 KB |
testcase_21 | AC | 835 ms
4,380 KB |
testcase_22 | AC | 1,580 ms
4,380 KB |
testcase_23 | AC | 327 ms
4,380 KB |
testcase_24 | AC | 257 ms
4,380 KB |
testcase_25 | AC | 1,529 ms
4,380 KB |
testcase_26 | AC | 1,662 ms
4,376 KB |
testcase_27 | TLE | - |
testcase_28 | TLE | - |
testcase_29 | TLE | - |
testcase_30 | TLE | - |
testcase_31 | TLE | - |
testcase_32 | TLE | - |
testcase_33 | TLE | - |
testcase_34 | TLE | - |
testcase_35 | TLE | - |
testcase_36 | TLE | - |
testcase_37 | TLE | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
testcase_45 | -- | - |
testcase_46 | -- | - |
testcase_47 | -- | - |
testcase_48 | -- | - |
testcase_49 | -- | - |
testcase_50 | -- | - |
testcase_51 | -- | - |
testcase_52 | -- | - |
testcase_53 | -- | - |
testcase_54 | -- | - |
testcase_55 | -- | - |
testcase_56 | -- | - |
testcase_57 | -- | - |
testcase_58 | -- | - |
testcase_59 | -- | - |
ソースコード
#include <bits/stdc++.h> using namespace std; long long modpow(long long b, long long x, long long mod) { long long res = 1; while (x) { if (x & 1) (res *= b) %= mod; (b *= b) %= mod; x >>= 1; } return res; } int x, v; int main() { int t; cin >> t; while (t--) { cin >> v >> x; int cnt = 0; int pr = v * x + 1; for (int i = 1; cnt < x; ++i) if (modpow(i, x, pr) == 1) cout << i << " \n"[++cnt == x]; } return 0; }