結果
| 問題 |
No.2488 Mod Sum Maximization
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-29 22:34:37 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 188 bytes |
| コンパイル時間 | 262 ms |
| コンパイル使用メモリ | 82,204 KB |
| 実行使用メモリ | 116,608 KB |
| 最終ジャッジ日時 | 2024-07-22 16:34:46 |
| 合計ジャッジ時間 | 5,220 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 11 |
ソースコード
N = int(input()) A = sorted(map(int, input().split())) ans = S = sum(A[:-1]) + A[-1]%A[0] for i in range(1, N-1): ans = max(ans, S - A[i] - A[-1]%A[0] + A[-1]%A[i] + A[i]%A[0]) print(ans)