結果
| 問題 |
No.3165 [Cherry 7th Tune A] Croissants Continu
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-30 21:49:59 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 400 ms / 2,000 ms |
| コード長 | 220 bytes |
| コンパイル時間 | 511 ms |
| コンパイル使用メモリ | 82,352 KB |
| 実行使用メモリ | 125,568 KB |
| 最終ジャッジ日時 | 2025-05-30 21:50:07 |
| 合計ジャッジ時間 | 7,532 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 31 |
ソースコード
T = int(input())
for _ in range(T):
N = int(input())
A = list(map(int, input().split()))
A.sort()
s = sum(A)
if 2 * A[-1] > s:
print((s - A[-1]) * 2 + 1)
else:
print(s)