結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー shogo314
提出日時 2024-02-24 01:35:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 604 ms / 2,000 ms
コード長 143 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 82,380 KB
実行使用メモリ 76,380 KB
最終ジャッジ日時 2024-09-29 09:44:27
合計ジャッジ時間 8,373 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.set_int_max_str_digits(0)
for _ in range(int(input())):
	N,M=map(int,input().split())
	a=N%(2*M)
	b=(N+1)%(2*M)
	print(a*b//2%M)
0