結果

問題 No.16 累乗の加算
ユーザー AtamaokaCAtamaokaC
提出日時 2021-06-19 17:41:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 5,000 ms
コード長 149 bytes
コンパイル時間 443 ms
コンパイル使用メモリ 87,360 KB
実行使用メモリ 71,528 KB
最終ジャッジ日時 2023-09-05 01:03:55
合計ジャッジ時間 2,090 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,256 KB
testcase_01 AC 66 ms
71,336 KB
testcase_02 AC 72 ms
71,420 KB
testcase_03 AC 66 ms
71,208 KB
testcase_04 AC 67 ms
71,440 KB
testcase_05 AC 67 ms
71,392 KB
testcase_06 AC 66 ms
71,116 KB
testcase_07 AC 68 ms
71,352 KB
testcase_08 AC 71 ms
71,320 KB
testcase_09 AC 72 ms
71,528 KB
testcase_10 AC 69 ms
71,392 KB
testcase_11 AC 71 ms
71,068 KB
testcase_12 AC 68 ms
71,188 KB
testcase_13 AC 67 ms
71,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10**6 + 3
inpl = lambda: list(map(int,input().split()))
x, N = inpl()
A = inpl()
S = 0
for a in A:
    S += pow(x,a,MOD)
    S %= MOD
print(S)
0