結果

問題 No.2203 POWER!!!!!
ユーザー おきょん.おきょん.
提出日時 2023-02-04 19:30:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 640 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 10,872 KB
実行使用メモリ 16,348 KB
最終ジャッジ日時 2023-09-16 16:02:18
合計ジャッジ時間 4,203 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,796 KB
testcase_01 AC 16 ms
7,920 KB
testcase_02 AC 16 ms
7,880 KB
testcase_03 AC 16 ms
7,940 KB
testcase_04 AC 16 ms
7,860 KB
testcase_05 AC 17 ms
7,824 KB
testcase_06 AC 16 ms
7,888 KB
testcase_07 AC 16 ms
7,800 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))
b1 = [1]*n
b2 = [2**(x-1) for x in a ]
b3 = [3**(x-1) for x in a ]
b4 = [4**(x-1) for x in a ]
b5 = [5**(x-1) for x in a ]
b6 = [6**(x-1) for x in a ]
b7 = [7**(x-1) for x in a ]
b8 = [8**(x-1) for x in a ]

ans = 0
for i in a:
    if i == 1:
        ans += i * sum(b1)
    elif i == 2:
        ans += i * sum(b2)
    elif i == 3:
        ans += i * sum(b3)
    elif i == 4:
        ans += i * sum(b4)
    elif i == 5:
        ans += i * sum(b5)
    elif i == 6:
        ans += i * sum(b6)
    elif i == 7:
        ans += i * sum(b7)
    elif i == 8:
        ans += i * sum(b8)
print(ans)
0