結果

問題 No.549 素材合成システム
ユーザー nanaenanae
提出日時 2017-04-04 11:01:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 501 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 10,772 KB
実行使用メモリ 19,752 KB
最終ジャッジ日時 2023-09-22 17:11:41
合計ジャッジ時間 4,243 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,844 KB
testcase_01 AC 15 ms
7,800 KB
testcase_02 AC 16 ms
7,788 KB
testcase_03 AC 15 ms
7,840 KB
testcase_04 AC 15 ms
7,744 KB
testcase_05 AC 16 ms
7,740 KB
testcase_06 AC 15 ms
7,720 KB
testcase_07 AC 88 ms
19,504 KB
testcase_08 AC 89 ms
19,500 KB
testcase_09 AC 88 ms
19,432 KB
testcase_10 AC 90 ms
19,360 KB
testcase_11 AC 88 ms
19,532 KB
testcase_12 AC 89 ms
19,492 KB
testcase_13 AC 89 ms
19,388 KB
testcase_14 AC 89 ms
19,348 KB
testcase_15 AC 89 ms
19,432 KB
testcase_16 AC 88 ms
19,356 KB
testcase_17 AC 53 ms
9,988 KB
testcase_18 AC 45 ms
9,400 KB
testcase_19 AC 51 ms
9,608 KB
testcase_20 AC 50 ms
9,868 KB
testcase_21 AC 63 ms
18,492 KB
testcase_22 AC 61 ms
17,476 KB
testcase_23 AC 68 ms
19,752 KB
testcase_24 AC 82 ms
18,564 KB
testcase_25 AC 74 ms
17,300 KB
testcase_26 AC 87 ms
19,228 KB
testcase_27 AC 75 ms
17,460 KB
testcase_28 AC 15 ms
7,860 KB
testcase_29 AC 15 ms
7,744 KB
testcase_30 AC 15 ms
7,796 KB
testcase_31 AC 53 ms
10,032 KB
testcase_32 AC 54 ms
9,920 KB
testcase_33 AC 55 ms
10,028 KB
testcase_34 AC 55 ms
10,024 KB
testcase_35 AC 69 ms
19,412 KB
testcase_36 AC 56 ms
9,928 KB
testcase_37 AC 55 ms
10,036 KB
testcase_38 AC 15 ms
7,796 KB
testcase_39 AC 16 ms
7,836 KB
testcase_40 AC 58 ms
14,932 KB
testcase_41 AC 34 ms
11,252 KB
testcase_42 AC 17 ms
8,292 KB
testcase_43 AC 28 ms
8,824 KB
testcase_44 AC 19 ms
8,412 KB
testcase_45 AC 31 ms
8,860 KB
testcase_46 AC 25 ms
8,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    N = int(input())
    x = [int(i) for i in input().split()]

    assert 2 <= N <= 10**5
    assert all(1 <= xi <= 10**4 for xi in x)
    assert N == len(x)

    # [x_i]を昇順にソート
    x.sort()

    # 経験値の小さいアンドロイドから順に一番大きい経験値のアンドロイドへ合成していく
    for i in range(N - 1):
        x[-1] += x[i] // 2

    ans = x[-1]

    assert 1 <= ans <= sum(x)

    print(ans)

if __name__ == '__main__':
    solve()
0