結果

問題 No.2755 行列の共役類
ユーザー 👑 p-adicp-adic
提出日時 2023-03-24 11:04:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 2,924 ms / 3,500 ms
コード長 490 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 78,592 KB
最終ジャッジ日時 2024-04-17 13:17:02
合計ジャッジ時間 21,764 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,096 KB
testcase_01 AC 43 ms
51,968 KB
testcase_02 AC 53 ms
59,520 KB
testcase_03 AC 80 ms
69,120 KB
testcase_04 AC 61 ms
60,928 KB
testcase_05 AC 57 ms
60,288 KB
testcase_06 AC 54 ms
59,264 KB
testcase_07 AC 95 ms
73,728 KB
testcase_08 AC 75 ms
68,096 KB
testcase_09 AC 64 ms
65,152 KB
testcase_10 AC 60 ms
63,360 KB
testcase_11 AC 58 ms
62,336 KB
testcase_12 AC 52 ms
60,160 KB
testcase_13 AC 107 ms
75,648 KB
testcase_14 AC 69 ms
65,152 KB
testcase_15 AC 66 ms
63,872 KB
testcase_16 AC 57 ms
62,336 KB
testcase_17 AC 67 ms
61,312 KB
testcase_18 AC 60 ms
60,544 KB
testcase_19 AC 52 ms
59,264 KB
testcase_20 AC 62 ms
59,904 KB
testcase_21 AC 123 ms
75,520 KB
testcase_22 AC 70 ms
65,280 KB
testcase_23 AC 75 ms
67,072 KB
testcase_24 AC 72 ms
66,944 KB
testcase_25 AC 64 ms
64,896 KB
testcase_26 AC 62 ms
63,616 KB
testcase_27 AC 68 ms
59,904 KB
testcase_28 AC 125 ms
75,392 KB
testcase_29 AC 73 ms
66,944 KB
testcase_30 AC 125 ms
75,776 KB
testcase_31 AC 121 ms
75,692 KB
testcase_32 AC 94 ms
73,600 KB
testcase_33 AC 66 ms
64,384 KB
testcase_34 AC 73 ms
66,176 KB
testcase_35 AC 63 ms
63,232 KB
testcase_36 AC 59 ms
61,312 KB
testcase_37 AC 68 ms
64,256 KB
testcase_38 AC 78 ms
68,224 KB
testcase_39 AC 88 ms
72,064 KB
testcase_40 AC 104 ms
75,648 KB
testcase_41 AC 104 ms
75,520 KB
testcase_42 AC 166 ms
75,904 KB
testcase_43 AC 124 ms
75,520 KB
testcase_44 AC 76 ms
66,176 KB
testcase_45 AC 75 ms
67,200 KB
testcase_46 AC 57 ms
61,952 KB
testcase_47 AC 66 ms
63,104 KB
testcase_48 AC 156 ms
75,392 KB
testcase_49 AC 51 ms
60,032 KB
testcase_50 AC 69 ms
65,408 KB
testcase_51 AC 52 ms
60,416 KB
testcase_52 AC 57 ms
61,952 KB
testcase_53 AC 1,909 ms
78,464 KB
testcase_54 AC 1,026 ms
76,672 KB
testcase_55 AC 712 ms
76,544 KB
testcase_56 AC 2,020 ms
78,336 KB
testcase_57 AC 1,068 ms
77,056 KB
testcase_58 AC 2,019 ms
78,592 KB
testcase_59 AC 1,059 ms
77,036 KB
testcase_60 AC 617 ms
62,848 KB
testcase_61 AC 49 ms
59,008 KB
testcase_62 AC 2,924 ms
78,592 KB
testcase_63 AC 1,316 ms
76,800 KB
testcase_64 AC 910 ms
76,288 KB
testcase_65 AC 56 ms
60,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

R,O=range,print
B,C=map(int,input().split())
b,P,e,n=B,[],1,0
for i in R(2,B):
	if i*i>b:break
	if b%i<1:
		b,P,e,n=b//i,P+[i],e*i-e,n+1
		while b%i<1:b,e=b//i,e*i
if b>1:P,e,n=P+[b],e*b-e,n+1
u=[pow(i,e-1,B)for i in R(B)]
d=B//C
b=d*B
F=[0]*b
a=0
for i in R(b):
	if F[i]:continue
	q,r,c=i//d,i%d,1
	for p in P:c*=q%p
	if c<1:continue
	a+=1
	if a>100:O("100+"),exit()
	for j in R(b):
		s,t,c=j//d,j%d,1
		for p in P:c*=s%p
		F[u[s]*q*s%B*d+u[s]*(q*t+r-t)%d]|=c
O(a)
0