結果

問題 No.1343 Dividing Digit
ユーザー hir355hir355
提出日時 2021-01-16 13:08:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 167 bytes
コンパイル時間 1,223 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 89,736 KB
最終ジャッジ日時 2023-08-18 09:14:55
合計ジャッジ時間 4,525 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,216 KB
testcase_01 AC 71 ms
71,388 KB
testcase_02 AC 70 ms
71,120 KB
testcase_03 AC 92 ms
89,356 KB
testcase_04 AC 74 ms
76,412 KB
testcase_05 AC 75 ms
77,976 KB
testcase_06 AC 76 ms
76,192 KB
testcase_07 AC 77 ms
80,164 KB
testcase_08 AC 87 ms
86,280 KB
testcase_09 AC 88 ms
87,956 KB
testcase_10 AC 76 ms
76,280 KB
testcase_11 AC 79 ms
79,232 KB
testcase_12 AC 86 ms
84,916 KB
testcase_13 AC 86 ms
83,772 KB
testcase_14 AC 76 ms
76,364 KB
testcase_15 AC 77 ms
78,680 KB
testcase_16 AC 74 ms
76,320 KB
testcase_17 AC 88 ms
87,896 KB
testcase_18 AC 91 ms
89,636 KB
testcase_19 AC 85 ms
83,440 KB
testcase_20 AC 81 ms
81,312 KB
testcase_21 AC 87 ms
86,232 KB
testcase_22 AC 88 ms
87,352 KB
testcase_23 AC 91 ms
89,736 KB
testcase_24 AC 92 ms
89,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
a.reverse()
t = 1
ans = 0
for x in a:
    ans += t * x
    t = t * k % s
print(ans % s)
0