結果

問題 No.2649 [Cherry 6th Tune C] Anthem Flower
ユーザー ntudantuda
提出日時 2024-02-24 09:42:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 671 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 3,722 ms
コンパイル使用メモリ 81,444 KB
実行使用メモリ 76,320 KB
最終ジャッジ日時 2024-02-24 09:42:50
合計ジャッジ時間 10,092 ms
ジャッジサーバーID
(参考情報)
judge16 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,332 KB
testcase_01 AC 583 ms
75,728 KB
testcase_02 AC 560 ms
75,728 KB
testcase_03 AC 589 ms
75,728 KB
testcase_04 AC 564 ms
75,728 KB
testcase_05 AC 671 ms
75,728 KB
testcase_06 AC 642 ms
75,728 KB
testcase_07 AC 98 ms
75,728 KB
testcase_08 AC 87 ms
75,728 KB
testcase_09 AC 59 ms
68,688 KB
testcase_10 AC 60 ms
68,688 KB
testcase_11 AC 43 ms
59,704 KB
testcase_12 AC 42 ms
59,704 KB
testcase_13 AC 61 ms
76,116 KB
testcase_14 AC 60 ms
75,896 KB
testcase_15 AC 64 ms
75,464 KB
testcase_16 AC 62 ms
75,672 KB
testcase_17 AC 60 ms
75,964 KB
testcase_18 AC 62 ms
75,576 KB
testcase_19 AC 62 ms
75,720 KB
testcase_20 AC 59 ms
76,288 KB
testcase_21 AC 62 ms
75,780 KB
testcase_22 AC 63 ms
76,188 KB
testcase_23 AC 57 ms
76,320 KB
testcase_24 AC 56 ms
76,320 KB
testcase_25 AC 57 ms
76,320 KB
testcase_26 AC 56 ms
76,320 KB
testcase_27 AC 57 ms
76,320 KB
testcase_28 AC 57 ms
76,320 KB
testcase_29 AC 56 ms
76,320 KB
testcase_30 AC 56 ms
76,320 KB
testcase_31 AC 57 ms
76,320 KB
testcase_32 AC 56 ms
76,320 KB
testcase_33 AC 50 ms
60,984 KB
testcase_34 AC 553 ms
75,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    N, M = input().split()
    N2 = 0
    M2 = int(M) * 2
    for n in N:
        N2 *= 10
        N2 += int(n)
        N2 %= M2
    print((N2 * (N2 + 1)) % M2 //2)
0