結果
| 問題 | No.2488 Mod Sum Maximization |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-29 22:34:37 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 188 bytes |
| 記録 | |
| コンパイル時間 | 227 ms |
| コンパイル使用メモリ | 85,308 KB |
| 実行使用メモリ | 131,372 KB |
| 最終ジャッジ日時 | 2026-04-03 10:03:17 |
| 合計ジャッジ時間 | 4,825 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)