結果

問題 No.16 累乗の加算
ユーザー HIROPON87069639HIROPON87069639
提出日時 2016-02-21 22:06:37
言語 Python2
(2.7.18)
結果
MLE  
実行時間 -
コード長 285 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 7,076 KB
実行使用メモリ 815,052 KB
最終ジャッジ日時 2023-10-23 18:48:30
合計ジャッジ時間 1,822 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,416 KB
testcase_01 AC 10 ms
6,416 KB
testcase_02 MLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
x, N = map(int, raw_input().split())
n = map(int, raw_input().split())
A = [1 for i in range(0, max(n)+1)]
tmp = 1
A[0] = 1
for i in xrange(1, max(n)+1):
    tmp *= x % 1000003
    A[i] = tmp
tot = 0
for i in xrange(0, N):
    tot += A[n[i]]
print tot % 1000003
0