結果

問題 No.77 レンガのピラミッド
ユーザー gigurururu
提出日時 2014-11-26 14:50:10
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 166 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2025-01-03 08:56:17
合計ジャッジ時間 2,026 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=list(map(int,input().split()))

exp=list(range(1,int(sum(a)**0.5)+1))
exp+=exp[-2::-1]+[0]*99

print(sum([max(ai-e,0) for ai,e in zip(a,exp)]))
0