結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー moon17
提出日時 2024-02-23 23:47:14
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 158 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 82,092 KB
実行使用メモリ 80,032 KB
最終ジャッジ日時 2024-09-29 09:14:54
合計ジャッジ時間 5,289 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 RE * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys;sys.set_int_max_str_digits(0)
for _ in range(int(input())):
  n,m=map(int,input().split())
  n1=n%m
  n2=(n+1)%m
  s=n1*n2*pow(2,-1,m)
  print(s%m)
0