結果

問題 No.378 名声値を稼ごう
ユーザー MarioMario
提出日時 2018-06-03 10:46:23
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 8,292 KB
最終ジャッジ日時 2023-09-12 21:46:17
合計ジャッジ時間 742 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,140 KB
testcase_01 AC 16 ms
8,264 KB
testcase_02 AC 16 ms
8,264 KB
testcase_03 AC 16 ms
8,272 KB
testcase_04 AC 16 ms
8,292 KB
testcase_05 AC 17 ms
8,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import takewhile, accumulate, repeat, chain
from operator import floordiv

normal = [i for i in takewhile(lambda x: x > 0, accumulate(chain([int(input())], repeat(2)), floordiv))]
special_max = max([sum(normal[:i], normal[i] * 2) for i in range(len(normal))])
print(special_max - sum(normal))
0