結果

問題 No.1343 Dividing Digit
ユーザー trineutrontrineutron
提出日時 2021-02-08 02:06:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 150 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 19,760 KB
最終ジャッジ日時 2023-09-18 04:38:13
合計ジャッジ時間 2,689 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,824 KB
testcase_01 AC 15 ms
7,844 KB
testcase_02 AC 15 ms
7,936 KB
testcase_03 AC 80 ms
18,716 KB
testcase_04 AC 21 ms
9,148 KB
testcase_05 AC 32 ms
11,100 KB
testcase_06 AC 26 ms
9,920 KB
testcase_07 AC 39 ms
12,308 KB
testcase_08 AC 64 ms
16,616 KB
testcase_09 AC 71 ms
17,412 KB
testcase_10 AC 23 ms
9,596 KB
testcase_11 AC 38 ms
11,516 KB
testcase_12 AC 60 ms
15,628 KB
testcase_13 AC 58 ms
15,244 KB
testcase_14 AC 23 ms
9,320 KB
testcase_15 AC 35 ms
11,376 KB
testcase_16 AC 23 ms
9,532 KB
testcase_17 AC 71 ms
17,476 KB
testcase_18 AC 75 ms
18,680 KB
testcase_19 AC 58 ms
15,220 KB
testcase_20 AC 45 ms
12,856 KB
testcase_21 AC 67 ms
17,080 KB
testcase_22 AC 69 ms
17,076 KB
testcase_23 AC 79 ms
19,760 KB
testcase_24 AC 66 ms
9,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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