結果
| 問題 |
No.2709 1975 Powers
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-14 12:53:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 286 bytes |
| コンパイル時間 | 291 ms |
| コンパイル使用メモリ | 82,636 KB |
| 実行使用メモリ | 76,148 KB |
| 最終ジャッジ日時 | 2025-07-14 12:53:24 |
| 合計ジャッジ時間 | 5,437 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 TLE * 1 -- * 23 |
ソースコード
from itertools import combinations
N,P,Q = map(int,input().split())
A = list(map(int,input().split()))
ans = 0
for x in combinations(A,4):
if len(set(x))<4:continue
x = sorted(x)
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)