結果
問題 | No.2517 Right Triangles on Circle |
ユーザー |
![]() |
提出日時 | 2023-10-27 22:13:44 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 424 ms / 2,000 ms |
コード長 | 219 bytes |
コンパイル時間 | 328 ms |
コンパイル使用メモリ | 81,940 KB |
実行使用メモリ | 247,584 KB |
最終ジャッジ日時 | 2024-09-25 14:17:13 |
合計ジャッジ時間 | 7,365 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
import collectionsN,M = map(int, input().split())A = list(map(int, input().split()))C = collections.Counter()for a in A:C[a%M]+=1ans = 0for k,v in C.items():ans+=v*C[M/2+k]*(N-C[k]-C[M/2+k])print(ans)