結果

問題 No.2517 Right Triangles on Circle
コンテスト
ユーザー H20
提出日時 2023-10-27 22:11:37
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
TLE  
実行時間 -
コード長 222 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 140 ms
コンパイル使用メモリ 85,760 KB
実行使用メモリ 214,476 KB
最終ジャッジ日時 2026-04-12 18:48:03
合計ジャッジ時間 5,111 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 TLE * 1 -- * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import collections
N,M = map(int, input().split())
A = list(map(int, input().split())) 
C = collections.Counter()
for a in A:
    C[a%M]+=1
ans = 0
for i in range(M//2):
    ans+=C[i]*C[M/2+i]*(N-C[i]-C[M/2+i])
print(ans)
0