結果
問題 | No.378 名声値を稼ごう |
ユーザー | Mario |
提出日時 | 2018-06-03 10:48:59 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 17 ms / 2,000 ms |
コード長 | 282 bytes |
コンパイル時間 | 73 ms |
コンパイル使用メモリ | 10,688 KB |
実行使用メモリ | 8,328 KB |
最終ジャッジ日時 | 2023-09-12 21:46:31 |
合計ジャッジ時間 | 748 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 17 ms
8,172 KB |
testcase_01 | AC | 16 ms
8,244 KB |
testcase_02 | AC | 16 ms
8,328 KB |
testcase_03 | AC | 16 ms
8,260 KB |
testcase_04 | AC | 16 ms
8,268 KB |
testcase_05 | AC | 16 ms
8,316 KB |
ソースコード
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))] print(max([sum(normal[:i], normal[i] * 2) for i in range(len(normal))]) - sum(normal))