結果
| 問題 | 
                            No.2649 [Cherry 6th Tune C] Anthem Flower
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-02-24 23:12:09 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 195 bytes | 
| コンパイル時間 | 216 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 11,904 KB | 
| 最終ジャッジ日時 | 2024-09-29 10:18:04 | 
| 合計ジャッジ時間 | 13,024 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 RE * 21 | 
ソースコード
T = int(input())
for _ in range(T):
    N, M = map(int, input().split())
    s = N
    t = N+1
    if s%2 == 0:
        s //= 2
    else:
        t //= 2
    s %= M
    t %= M
    print((s*t)%M)