結果
| 問題 | 
                            No.2517 Right Triangles on Circle
                             | 
                    
| コンテスト | |
| ユーザー | 
                             sasa8uyauya
                         | 
                    
| 提出日時 | 2023-10-27 21:30:47 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 192 ms / 2,000 ms | 
| コード長 | 157 bytes | 
| コンパイル時間 | 320 ms | 
| コンパイル使用メモリ | 82,480 KB | 
| 実行使用メモリ | 169,484 KB | 
| 最終ジャッジ日時 | 2024-09-25 13:34:03 | 
| 合計ジャッジ時間 | 4,922 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 29 | 
ソースコード
n,m=map(int,input().split())
d={}
for a in list(map(int,input().split())):
  d[a-1]=1
c=0
for v in d:
  if (v+m//2)%m in d:
    c+=n-2
print((c*(m%2==0))//2)
            
            
            
        
            
sasa8uyauya