結果

問題 No.2709 1975 Powers
ユーザー flippergo
提出日時 2025-07-14 12:56:41
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 249 bytes
コンパイル時間 249 ms
コンパイル使用メモリ 82,660 KB
実行使用メモリ 83,736 KB
最終ジャッジ日時 2025-07-14 12:56:47
合計ジャッジ時間 4,957 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 1 TLE * 1 -- * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations
N,P,Q = map(int,input().split())
A = list(set(list(map(int,input().split()))))
ans = 0
for x in combinations(A,4):
    if (pow(10,x[0],P)+pow(9,x[1],P)+pow(7,x[2],P)+pow(5,x[3],P))%P==Q:
        ans += 1
print(ans)
0