結果

問題 No.16 累乗の加算
ユーザー HIROPON87069639
提出日時 2016-02-21 22:06:37
言語 Python2
(2.7.18)
結果
MLE  
実行時間 -
コード長 285 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 815,352 KB
最終ジャッジ日時 2024-09-22 12:35:08
合計ジャッジ時間 1,790 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 MLE * 1 -- * 11
権限があれば一括ダウンロードができます

ソースコード

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