結果
| 問題 |
No.3165 [Cherry 7th Tune A] Croissants Continu
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2025-06-04 02:29:10 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 310 bytes |
| コンパイル時間 | 1,216 ms |
| コンパイル使用メモリ | 11,776 KB |
| 実行使用メモリ | 42,828 KB |
| 最終ジャッジ日時 | 2025-06-04 02:29:20 |
| 合計ジャッジ時間 | 9,063 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 WA * 21 |
ソースコード
import sys
input = sys.stdin.readline
T=int(input())
for tests in range(T):
N=int(input())
A=list(map(int,input().split()))
if N==1:
print(1)
continue
A.sort()
SUM=sum(A)
if A[-1]<=SUM//2:
print(SUM)
else:
A[-1]=sum(A[:-1])
print(sum(A))
titia