結果

問題 No.1343 Dividing Digit
ユーザー googol_S0googol_S0
提出日時 2021-01-16 13:24:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 123 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 81,976 KB
実行使用メモリ 79,488 KB
最終ジャッジ日時 2024-05-05 15:23:43
合計ジャッジ時間 2,555 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,300 KB
testcase_01 AC 38 ms
52,096 KB
testcase_02 AC 38 ms
51,328 KB
testcase_03 AC 69 ms
78,592 KB
testcase_04 AC 49 ms
60,416 KB
testcase_05 AC 49 ms
64,512 KB
testcase_06 AC 50 ms
61,824 KB
testcase_07 AC 49 ms
66,304 KB
testcase_08 AC 59 ms
74,752 KB
testcase_09 AC 61 ms
76,544 KB
testcase_10 AC 46 ms
61,184 KB
testcase_11 AC 50 ms
65,920 KB
testcase_12 AC 57 ms
72,704 KB
testcase_13 AC 56 ms
71,552 KB
testcase_14 AC 46 ms
61,056 KB
testcase_15 AC 49 ms
65,024 KB
testcase_16 AC 44 ms
61,440 KB
testcase_17 AC 60 ms
76,280 KB
testcase_18 AC 63 ms
78,976 KB
testcase_19 AC 55 ms
71,680 KB
testcase_20 AC 52 ms
68,480 KB
testcase_21 AC 58 ms
74,624 KB
testcase_22 AC 59 ms
76,044 KB
testcase_23 AC 63 ms
79,488 KB
testcase_24 AC 61 ms
77,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
mod=sum(A)
P=0
for i in range(N):
  P=(P*K+A[i])%mod
print(P)
0