結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー 👑 p-adicp-adic
提出日時 2023-07-25 09:04:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 596 ms / 2,000 ms
コード長 124 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,320 KB
最終ジャッジ日時 2024-02-23 00:20:53
合計ジャッジ時間 8,084 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
53,332 KB
testcase_01 AC 494 ms
75,600 KB
testcase_02 AC 491 ms
75,600 KB
testcase_03 AC 530 ms
75,600 KB
testcase_04 AC 506 ms
75,600 KB
testcase_05 AC 568 ms
75,600 KB
testcase_06 AC 596 ms
75,600 KB
testcase_07 AC 76 ms
75,600 KB
testcase_08 AC 76 ms
75,600 KB
testcase_09 AC 53 ms
68,560 KB
testcase_10 AC 51 ms
68,560 KB
testcase_11 AC 37 ms
59,704 KB
testcase_12 AC 37 ms
59,704 KB
testcase_13 AC 63 ms
76,116 KB
testcase_14 AC 54 ms
75,896 KB
testcase_15 AC 62 ms
75,464 KB
testcase_16 AC 62 ms
75,672 KB
testcase_17 AC 54 ms
75,964 KB
testcase_18 AC 54 ms
75,576 KB
testcase_19 AC 55 ms
75,720 KB
testcase_20 AC 54 ms
76,288 KB
testcase_21 AC 63 ms
75,780 KB
testcase_22 AC 58 ms
76,188 KB
testcase_23 AC 53 ms
76,320 KB
testcase_24 AC 52 ms
76,320 KB
testcase_25 AC 54 ms
76,320 KB
testcase_26 AC 53 ms
76,320 KB
testcase_27 AC 53 ms
76,320 KB
testcase_28 AC 56 ms
76,320 KB
testcase_29 AC 64 ms
76,320 KB
testcase_30 AC 57 ms
76,320 KB
testcase_31 AC 56 ms
76,320 KB
testcase_32 AC 54 ms
76,320 KB
testcase_33 AC 46 ms
60,984 KB
testcase_34 AC 474 ms
75,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I=input
for t in range(int(I())):
	S,M=I().split()
	N,M=0,int(M)
	for s in S:N=(N*10+int(s))%(M*2)
	print(N*(N+1)//2%M)
0