結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー ikomaikoma
提出日時 2024-02-23 23:26:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 254 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 79,248 KB
最終ジャッジ日時 2024-02-23 23:26:48
合計ジャッジ時間 8,402 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,204 KB
testcase_01 AC 131 ms
75,584 KB
testcase_02 AC 130 ms
75,584 KB
testcase_03 AC 136 ms
75,584 KB
testcase_04 AC 129 ms
75,584 KB
testcase_05 AC 254 ms
75,996 KB
testcase_06 AC 244 ms
75,996 KB
testcase_07 AC 77 ms
75,512 KB
testcase_08 AC 72 ms
75,484 KB
testcase_09 AC 55 ms
66,372 KB
testcase_10 AC 55 ms
66,372 KB
testcase_11 AC 36 ms
53,204 KB
testcase_12 AC 37 ms
53,204 KB
testcase_13 AC 143 ms
73,940 KB
testcase_14 AC 131 ms
72,928 KB
testcase_15 AC 118 ms
72,604 KB
testcase_16 AC 123 ms
72,820 KB
testcase_17 AC 153 ms
75,036 KB
testcase_18 AC 118 ms
73,244 KB
testcase_19 AC 144 ms
74,264 KB
testcase_20 AC 224 ms
79,248 KB
testcase_21 AC 142 ms
73,884 KB
testcase_22 AC 174 ms
74,820 KB
testcase_23 AC 225 ms
79,144 KB
testcase_24 AC 223 ms
79,144 KB
testcase_25 AC 222 ms
79,144 KB
testcase_26 AC 222 ms
79,144 KB
testcase_27 AC 248 ms
79,144 KB
testcase_28 AC 228 ms
79,144 KB
testcase_29 AC 240 ms
79,144 KB
testcase_30 AC 218 ms
78,760 KB
testcase_31 AC 219 ms
78,632 KB
testcase_32 AC 243 ms
79,144 KB
testcase_33 AC 206 ms
78,376 KB
testcase_34 AC 124 ms
75,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
sys.set_int_max_str_digits(0)

T=int(input())

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