結果
問題 | No.2709 1975 Powers |
ユーザー | 茅ヶ崎裕太 |
提出日時 | 2024-03-31 15:03:33 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 415 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 81,700 KB |
実行使用メモリ | 75,456 KB |
最終ジャッジ日時 | 2024-03-31 15:03:44 |
合計ジャッジ時間 | 10,683 ms |
ジャッジサーバーID (参考情報) |
judge10 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 39 ms
53,460 KB |
testcase_01 | WA | - |
testcase_02 | AC | 52 ms
62,108 KB |
testcase_03 | AC | 432 ms
75,296 KB |
testcase_04 | AC | 713 ms
75,296 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 42 ms
59,848 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 43 ms
59,848 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 106 ms
70,304 KB |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 49 ms
64,196 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 828 ms
75,296 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 823 ms
75,296 KB |
testcase_26 | AC | 824 ms
75,296 KB |
ソースコード
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): for j in range(i+1,N-3): for k in range(j+1,N-2): for m in range(k+1,N-1): if (L[i][0]+L[j][1]+L[k][2]+L[m][3])%P==Q: ans+=1 print(ans)