結果

問題 No.2709 1975 Powers
ユーザー 茅ヶ崎裕太茅ヶ崎裕太
提出日時 2024-03-31 15:07:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 415 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 75,344 KB
最終ジャッジ日時 2024-03-31 15:07:43
合計ジャッジ時間 10,558 ms
ジャッジサーバーID
(参考情報)
judge12 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,460 KB
testcase_01 AC 36 ms
53,460 KB
testcase_02 AC 51 ms
62,108 KB
testcase_03 AC 465 ms
75,296 KB
testcase_04 AC 704 ms
75,296 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 44 ms
59,848 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 47 ms
62,132 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 112 ms
70,304 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 859 ms
75,296 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 818 ms
75,296 KB
testcase_26 AC 844 ms
75,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,P,Q=map(int,input().split())
A=list(map(int,input().split()))
L=[[0 for _ in range(4)]for _ in range(N)]
t=[10,9,7,5]
for i in range(N):
    for j in range(4):
        L[i][j]=pow(t[j],A[i],P)
ans=0
for i in range(N-3):
    for j in range(i+1,N-2):
        for k in range(j+1,N-1):
            for m in range(k+1,N):
                if (L[i][0]+L[j][1]+L[k][2]+L[m][3])%P==Q:
                    ans+=1
print(ans)
0