結果

問題 No.1343 Dividing Digit
ユーザー arahi10arahi10
提出日時 2021-02-19 19:54:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 119 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 19,720 KB
最終ジャッジ日時 2023-10-14 22:19:22
合計ジャッジ時間 3,149 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,748 KB
testcase_01 AC 16 ms
7,876 KB
testcase_02 AC 15 ms
7,876 KB
testcase_03 AC 66 ms
18,912 KB
testcase_04 AC 21 ms
9,256 KB
testcase_05 AC 30 ms
11,116 KB
testcase_06 AC 25 ms
9,872 KB
testcase_07 AC 36 ms
12,260 KB
testcase_08 AC 57 ms
16,624 KB
testcase_09 AC 62 ms
17,584 KB
testcase_10 AC 23 ms
9,460 KB
testcase_11 AC 34 ms
11,616 KB
testcase_12 AC 53 ms
15,684 KB
testcase_13 AC 50 ms
15,244 KB
testcase_14 AC 22 ms
9,316 KB
testcase_15 AC 32 ms
11,448 KB
testcase_16 AC 23 ms
9,416 KB
testcase_17 AC 62 ms
17,620 KB
testcase_18 AC 66 ms
18,816 KB
testcase_19 AC 51 ms
15,236 KB
testcase_20 AC 40 ms
12,868 KB
testcase_21 AC 60 ms
17,068 KB
testcase_22 AC 60 ms
16,992 KB
testcase_23 AC 69 ms
19,720 KB
testcase_24 AC 54 ms
10,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
a=list(map(int,input().split()))
S=sum(a)
now=0
for i in a:
    now=(now*k+i)%S
print(now)
0