結果

問題 No.2517 Right Triangles on Circle
ユーザー 👑 H20H20
提出日時 2023-10-27 22:11:37
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 222 bytes
コンパイル時間 685 ms
コンパイル使用メモリ 81,776 KB
実行使用メモリ 245,436 KB
最終ジャッジ日時 2023-10-27 22:11:43
合計ジャッジ時間 6,115 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
57,604 KB
testcase_01 AC 41 ms
53,232 KB
testcase_02 AC 41 ms
53,232 KB
testcase_03 AC 41 ms
53,232 KB
testcase_04 AC 41 ms
53,232 KB
testcase_05 AC 42 ms
55,280 KB
testcase_06 AC 43 ms
55,280 KB
testcase_07 AC 43 ms
55,280 KB
testcase_08 AC 43 ms
55,280 KB
testcase_09 AC 42 ms
55,280 KB
testcase_10 AC 43 ms
55,280 KB
testcase_11 AC 43 ms
58,064 KB
testcase_12 AC 42 ms
55,280 KB
testcase_13 AC 409 ms
245,436 KB
testcase_14 AC 383 ms
245,428 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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