結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー i_am_noob
提出日時 2024-03-25 22:53:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 177 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 76,544 KB
最終ジャッジ日時 2024-09-30 14:09:52
合計ジャッジ時間 7,818 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
	s, mod = input().split()
	mod = int(mod)
	res = 0
	for i in s:
		res = (res * 10 + (ord(i) - ord('0'))) % mod
	print((res * (res + 1) // 2) % mod)
0