結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー yupooh
提出日時 2024-02-23 21:32:54
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 138 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 81,972 KB
実行使用メモリ 76,672 KB
最終ジャッジ日時 2024-09-29 05:40:49
合計ジャッジ時間 4,813 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 RE * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
t=int(input())
for _ in range(t):
  n,m=map(int,input().split())
  ans=((n*(n+1))//2)%m
  print(ans)
0