結果
| 問題 | No.77 レンガのピラミッド |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-20 15:39:18 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 171 ms / 5,000 ms |
| コード長 | 229 bytes |
| 記録 | |
| コンパイル時間 | 595 ms |
| コンパイル使用メモリ | 20,684 KB |
| 実行使用メモリ | 15,452 KB |
| 最終ジャッジ日時 | 2026-04-22 14:19:44 |
| 合計ジャッジ時間 | 5,014 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 20 |
ソースコード
n = int(input())
a = list(map(int,input().split()))
s = sum(a)
t = int(s**0.5)
b = [i+1 for i in range(t)] + [i for i in range(t-1, 0, -1)]
c = 0
for i in range(min(len(a), len(b))):
c += min(a[i], b[i])
d = s - c
print(d)