結果
| 問題 |
No.2260 Adic Sum
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-26 16:13:05 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 204 bytes |
| コンパイル時間 | 369 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 28,296 KB |
| 最終ジャッジ日時 | 2024-11-15 23:19:40 |
| 合計ジャッジ時間 | 18,525 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 TLE * 1 |
ソースコード
from collections import * n,p=map(int,input().split()) a=list(map(int,input().split())) res=0 q=p while q<10**9+3: d=defaultdict(int) for i in range(n): res+=d[a[i]%q] d[a[i]%q]+=1 q*=p print(res)