結果

問題 No.16 累乗の加算
ユーザー srup٩(๑`н´๑)۶
提出日時 2016-09-06 20:53:31
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 144 bytes
コンパイル時間 438 ms
コンパイル使用メモリ 7,072 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-06-26 05:16:32
合計ジャッジ時間 1,299 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

x, n = map(int, raw_input().split())
a = map(int, raw_input().split())

mod = 1000003
ans = 0
for i in a:
	ans += pow(x, i, mod)
print ans % mod
0