結果

問題 No.16 累乗の加算
ユーザー JunOnumaJunOnuma
提出日時 2017-06-14 15:14:31
言語 Python2
(2.7.18)
結果
TLE  
実行時間 -
コード長 221 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 7,072 KB
実行使用メモリ 10,708 KB
最終ジャッジ日時 2023-10-25 01:31:39
合計ジャッジ時間 6,910 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,384 KB
testcase_01 AC 11 ms
6,384 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

x,n = map(int, raw_input().split())
l = sorted(map(int, raw_input().split()))
ret = 0
r = 1
p = 0
i = 0
while p <= l[-1]:
    if p == l[i]:
        ret += r
        i += 1
    r = (r * x) % (10**6+3)
    p += 1
print ret
0