結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー titia
提出日時 2024-02-23 21:34:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 260 ms / 2,000 ms
コード長 172 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 82,588 KB
実行使用メモリ 79,700 KB
最終ジャッジ日時 2024-09-29 05:45:43
合計ジャッジ時間 7,534 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

sys.set_int_max_str_digits(10**7)

T=int(input())
for tests in range(T):
    N,M=map(int,input().split())

    print((N*(N+1)//2)%M)
0