結果
| 問題 |
No.16 累乗の加算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-19 22:15:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 281 bytes |
| コンパイル時間 | 189 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-18 08:21:27 |
| 合計ジャッジ時間 | 1,163 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 1 RE * 11 |
ソースコード
import math
if __name__ == "__main__":
x, n = map(int, input().split(" "))
ans = 0
for i in list(map(int, input().split(" "))):
if i % 2 == 1:
i -= 1
ans += math.pow(math.pow(x, 2), i // 2) % 1000003
print(int(ans % 1000003))