結果

問題 No.1343 Dividing Digit
ユーザー convexineqconvexineq
提出日時 2021-01-16 13:33:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 105 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 82,180 KB
実行使用メモリ 82,544 KB
最終ジャッジ日時 2024-05-05 15:33:05
合計ジャッジ時間 2,464 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
52,060 KB
testcase_01 AC 37 ms
51,980 KB
testcase_02 AC 37 ms
52,296 KB
testcase_03 AC 65 ms
82,148 KB
testcase_04 AC 43 ms
61,852 KB
testcase_05 AC 48 ms
65,324 KB
testcase_06 AC 45 ms
63,196 KB
testcase_07 AC 51 ms
68,584 KB
testcase_08 AC 61 ms
77,108 KB
testcase_09 AC 63 ms
79,380 KB
testcase_10 AC 44 ms
63,324 KB
testcase_11 AC 50 ms
68,432 KB
testcase_12 AC 59 ms
75,568 KB
testcase_13 AC 56 ms
73,492 KB
testcase_14 AC 44 ms
61,620 KB
testcase_15 AC 49 ms
65,844 KB
testcase_16 AC 45 ms
62,768 KB
testcase_17 AC 63 ms
79,212 KB
testcase_18 AC 65 ms
82,296 KB
testcase_19 AC 56 ms
73,896 KB
testcase_20 AC 52 ms
69,824 KB
testcase_21 AC 62 ms
78,056 KB
testcase_22 AC 63 ms
79,376 KB
testcase_23 AC 64 ms
82,544 KB
testcase_24 AC 62 ms
81,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,*a = map(int,open(0).read().split())
s = sum(a)
x = 0
for ai in a:
    x = x*k+ai
    x %= s
print(x)
0