結果

問題 No.2517 Right Triangles on Circle
ユーザー rlangevinrlangevin
提出日時 2023-10-27 21:31:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 225 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 81,724 KB
実行使用メモリ 145,876 KB
最終ジャッジ日時 2023-10-27 21:31:16
合計ジャッジ時間 4,536 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,548 KB
testcase_01 AC 36 ms
53,548 KB
testcase_02 AC 36 ms
53,548 KB
testcase_03 AC 35 ms
53,548 KB
testcase_04 AC 36 ms
53,548 KB
testcase_05 AC 36 ms
53,548 KB
testcase_06 AC 36 ms
53,548 KB
testcase_07 AC 36 ms
53,548 KB
testcase_08 AC 36 ms
53,548 KB
testcase_09 AC 37 ms
53,548 KB
testcase_10 AC 36 ms
53,548 KB
testcase_11 AC 36 ms
53,548 KB
testcase_12 AC 37 ms
53,548 KB
testcase_13 AC 152 ms
136,052 KB
testcase_14 AC 134 ms
135,716 KB
testcase_15 AC 225 ms
145,876 KB
testcase_16 AC 196 ms
145,740 KB
testcase_17 AC 152 ms
136,276 KB
testcase_18 AC 140 ms
130,288 KB
testcase_19 AC 123 ms
121,464 KB
testcase_20 AC 124 ms
122,008 KB
testcase_21 AC 192 ms
140,240 KB
testcase_22 AC 67 ms
85,908 KB
testcase_23 AC 143 ms
120,372 KB
testcase_24 AC 81 ms
93,652 KB
testcase_25 AC 61 ms
81,576 KB
testcase_26 AC 169 ms
129,364 KB
testcase_27 AC 62 ms
83,680 KB
testcase_28 AC 58 ms
74,580 KB
testcase_29 AC 78 ms
91,240 KB
testcase_30 AC 64 ms
79,980 KB
testcase_31 AC 148 ms
120,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = set(map(int, input().split()))
if M % 2:
    print(0)
    exit()
    
ans = 0
for a in A:
    if (a + M // 2)%M in A or (a + M // 2)%M + M in A:
        ans += N - 2
        
print(ans//2)
0