結果

問題 No.16 累乗の加算
ユーザー miho-4miho-4
提出日時 2023-08-12 17:28:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 35 ms / 5,000 ms
コード長 145 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 82,276 KB
実行使用メモリ 53,744 KB
最終ジャッジ日時 2024-04-30 12:34:08
合計ジャッジ時間 1,199 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,320 KB
testcase_01 AC 31 ms
52,828 KB
testcase_02 AC 32 ms
52,212 KB
testcase_03 AC 31 ms
52,316 KB
testcase_04 AC 32 ms
53,100 KB
testcase_05 AC 31 ms
52,688 KB
testcase_06 AC 31 ms
53,360 KB
testcase_07 AC 31 ms
52,768 KB
testcase_08 AC 31 ms
52,260 KB
testcase_09 AC 32 ms
52,624 KB
testcase_10 AC 33 ms
53,744 KB
testcase_11 AC 33 ms
51,992 KB
testcase_12 AC 33 ms
52,328 KB
testcase_13 AC 35 ms
52,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x,n=map(int,input().split())
L=list(map(int,input().split()))
mod=10**6+3
ans=0
for i in range(n):
	ans+=pow(x,L[i],mod)
	ans%=mod
print(ans%mod)
0