結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー anonymouslyanonymously
提出日時 2024-02-23 21:51:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 202 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 21,792 KB
最終ジャッジ日時 2024-04-10 20:29:43
合計ジャッジ時間 16,280 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,624 KB
testcase_01 AC 1,151 ms
21,668 KB
testcase_02 AC 1,162 ms
21,664 KB
testcase_03 AC 1,241 ms
21,792 KB
testcase_04 AC 1,169 ms
21,668 KB
testcase_05 TLE -
testcase_06 TLE -
testcase_07 AC 122 ms
11,264 KB
testcase_08 AC 124 ms
11,264 KB
testcase_09 AC 45 ms
10,880 KB
testcase_10 AC 45 ms
10,880 KB
testcase_11 AC 26 ms
10,752 KB
testcase_12 AC 25 ms
10,752 KB
testcase_13 AC 173 ms
11,268 KB
testcase_14 AC 175 ms
11,140 KB
testcase_15 AC 168 ms
11,136 KB
testcase_16 AC 180 ms
11,264 KB
testcase_17 AC 163 ms
11,648 KB
testcase_18 AC 160 ms
11,264 KB
testcase_19 AC 185 ms
11,392 KB
testcase_20 AC 196 ms
11,896 KB
testcase_21 AC 161 ms
11,392 KB
testcase_22 AC 191 ms
11,528 KB
testcase_23 AC 146 ms
11,908 KB
testcase_24 AC 159 ms
11,908 KB
testcase_25 AC 192 ms
12,040 KB
testcase_26 AC 162 ms
11,904 KB
testcase_27 AC 193 ms
11,912 KB
testcase_28 AC 191 ms
11,908 KB
testcase_29 AC 190 ms
11,904 KB
testcase_30 AC 156 ms
11,912 KB
testcase_31 AC 202 ms
11,912 KB
testcase_32 AC 199 ms
11,904 KB
testcase_33 AC 197 ms
11,908 KB
testcase_34 AC 946 ms
21,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(n,m):
    m=int(m)
    tmp=0
    for c in n:
        tmp=10*tmp+int(c)
        tmp%=(2*m)
    return (tmp*(tmp+1)//2)%m

print(*[solve(*input().split()) for i in range(int(input()))],sep='\n')
0