結果

問題 No.16 累乗の加算
ユーザー motor_radialmotor_radial
提出日時 2020-03-18 08:38:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 14 ms / 5,000 ms
コード長 128 bytes
コンパイル時間 400 ms
コンパイル使用メモリ 10,512 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-08-20 19:42:15
合計ジャッジ時間 937 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,964 KB
testcase_01 AC 13 ms
7,892 KB
testcase_02 AC 13 ms
7,856 KB
testcase_03 AC 12 ms
7,832 KB
testcase_04 AC 12 ms
7,792 KB
testcase_05 AC 13 ms
7,884 KB
testcase_06 AC 14 ms
7,824 KB
testcase_07 AC 14 ms
7,788 KB
testcase_08 AC 13 ms
7,888 KB
testcase_09 AC 12 ms
7,828 KB
testcase_10 AC 13 ms
7,936 KB
testcase_11 AC 12 ms
7,828 KB
testcase_12 AC 12 ms
7,888 KB
testcase_13 AC 12 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x,N=map(int,input().split())
a=list(map(int,input().split()))
ans=0
mod=1000003
for i in a:
    ans+=pow(x,i,mod)
print(ans%mod)
0