結果
| 問題 | 
                            No.16 累乗の加算
                             | 
                    
| コンテスト | |
| ユーザー | 
                             HIROPON87069639
                         | 
                    
| 提出日時 | 2016-02-21 23:48:46 | 
| 言語 | Python2  (2.7.18)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 12 ms / 5,000 ms | 
| コード長 | 140 bytes | 
| コンパイル時間 | 401 ms | 
| コンパイル使用メモリ | 7,040 KB | 
| 実行使用メモリ | 6,272 KB | 
| 最終ジャッジ日時 | 2024-06-26 05:09:42 | 
| 合計ジャッジ時間 | 914 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 14 | 
ソースコード
x, N = map(int, raw_input().split())
n = map(int, raw_input().split())
f = 1000003
tot = 0
for i in n:
    tot += pow(x, i, f)
print tot % f
            
            
            
        
            
HIROPON87069639