結果
| 問題 |
No.16 累乗の加算
|
| コンテスト | |
| ユーザー |
threepipes_s
|
| 提出日時 | 2015-12-30 01:15:55 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 269 bytes |
| コンパイル時間 | 209 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-19 08:35:47 |
| 合計ジャッジ時間 | 1,154 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 10 |
ソースコード
def modpow(x, n, m):
res = 1
while(n>0):
if((n&1)==1): res = x*res%m
x = x*x%m
n >>= 1
return res
x, n = map(int, input().split())
m = 1000003
res = 0
for a in list(map(int, input().split())):
res += modpow(x, a, m)
print(res)
threepipes_s