結果

問題 No.2755 行列の共役類
ユーザー ShirotsumeShirotsume
提出日時 2023-06-30 21:17:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 736 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 131,840 KB
最終ジャッジ日時 2024-04-17 13:39:31
合計ジャッジ時間 30,905 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
131,840 KB
testcase_01 AC 52 ms
55,680 KB
testcase_02 WA -
testcase_03 AC 386 ms
77,056 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 370 ms
77,312 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 775 ms
77,372 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 282 ms
77,312 KB
testcase_25 WA -
testcase_26 AC 162 ms
77,184 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 2,033 ms
77,440 KB
testcase_31 AC 1,488 ms
77,184 KB
testcase_32 AC 712 ms
77,056 KB
testcase_33 WA -
testcase_34 AC 309 ms
77,208 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 1,941 ms
77,340 KB
testcase_40 AC 1,495 ms
77,056 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 198 ms
71,040 KB
testcase_50 WA -
testcase_51 AC 267 ms
71,296 KB
testcase_52 AC 305 ms
71,296 KB
testcase_53 TLE -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, time, random
from collections import deque, Counter, defaultdict
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353
from math import gcd
B, C = mi()

S = set()

ans = 0
for a in range(0, B):
    for b in range(0, B):
        if gcd(a, B) != 1 or b % C != 0 or (a, b) in S:
            continue
        ans += 1
        for a1 in range(0, B):
            for b1 in range(0, B):
                if gcd(a1, B) == 1 and b1 % C == 0:
                    a2 = a
                    b2 = (B - b1 * (a * b1 + b) * pow(a1, B - 2, B)) % B
                    S.add((a2, b2))

print(ans if ans <= 100 else '100+')



0