結果
| 問題 | No.16 累乗の加算 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-03-06 02:58:56 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                RE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 192 bytes | 
| コンパイル時間 | 88 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-09-14 07:00:07 | 
| 合計ジャッジ時間 | 1,160 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | RE * 14 | 
ソースコード
def p(x,n,m):
  v=1
  while n:
    if n&1:v=v*x%m
    n>>=1
    x*=x%m
  return v%m
x,n=map(int,input().split())
a=list(map(int,input().split())%m)
m=1000003
print(sum([p(x,i,m) for i in a]))
            
            
            
        