結果
問題 |
No.2649 [Cherry 6th Tune C] Anthem Flower
|
ユーザー |
|
提出日時 | 2024-02-23 21:49:58 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 337 bytes |
コンパイル時間 | 216 ms |
コンパイル使用メモリ | 82,324 KB |
実行使用メモリ | 76,952 KB |
最終ジャッジ日時 | 2024-09-29 06:13:48 |
合計ジャッジ時間 | 6,493 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 13 RE * 21 |
ソースコード
class Summation: def __init__(self, n, m): self.n = n self.m = m def calculate(self): n, m = self.n, self.m return ((n % m) * ((n + 1) % m) // 2) % m T = int(input()) for _ in range(T): N, M = map(int, input().split()) summation = Summation(N, M) print(summation.calculate())