結果

問題 No.2517 Right Triangles on Circle
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-10-27 22:09:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 176 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 1,106 ms
コンパイル使用メモリ 81,588 KB
実行使用メモリ 168,172 KB
最終ジャッジ日時 2023-10-27 22:09:20
合計ジャッジ時間 4,582 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,276 KB
testcase_01 AC 36 ms
53,276 KB
testcase_02 AC 36 ms
53,276 KB
testcase_03 AC 35 ms
53,276 KB
testcase_04 AC 35 ms
53,276 KB
testcase_05 AC 35 ms
53,276 KB
testcase_06 AC 36 ms
53,276 KB
testcase_07 AC 35 ms
53,276 KB
testcase_08 AC 36 ms
53,276 KB
testcase_09 AC 35 ms
53,276 KB
testcase_10 AC 35 ms
53,276 KB
testcase_11 AC 35 ms
53,276 KB
testcase_12 AC 35 ms
53,276 KB
testcase_13 AC 176 ms
158,188 KB
testcase_14 AC 153 ms
158,112 KB
testcase_15 AC 174 ms
168,172 KB
testcase_16 AC 174 ms
167,672 KB
testcase_17 AC 141 ms
116,536 KB
testcase_18 AC 129 ms
112,432 KB
testcase_19 AC 119 ms
136,056 KB
testcase_20 AC 126 ms
137,472 KB
testcase_21 AC 172 ms
162,100 KB
testcase_22 AC 74 ms
93,288 KB
testcase_23 AC 139 ms
135,192 KB
testcase_24 AC 81 ms
99,516 KB
testcase_25 AC 63 ms
87,648 KB
testcase_26 AC 154 ms
146,620 KB
testcase_27 AC 66 ms
90,380 KB
testcase_28 AC 55 ms
76,368 KB
testcase_29 AC 76 ms
99,120 KB
testcase_30 AC 63 ms
85,132 KB
testcase_31 AC 141 ms
135,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
A = list(map(int,input().split()))

s = set()
for a in A:
    s.add(a%m)
ans = 0

if m%2:
    print(0)
    exit()

for a in A:
    na = (a+m//2)%m
    if na in s:
        ans += n-2
print(ans//2)
0