結果
問題 |
No.1233 割り切れない気持ち
|
ユーザー |
|
提出日時 | 2020-09-18 21:54:41 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 284 bytes |
コンパイル時間 | 813 ms |
コンパイル使用メモリ | 82,420 KB |
実行使用メモリ | 108,148 KB |
最終ジャッジ日時 | 2024-06-22 16:50:44 |
合計ジャッジ時間 | 14,706 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 TLE * 1 -- * 13 |
ソースコード
N = int(input()) A = list(map(int, input().split())) A.sort() ans = sum(A) * N from bisect import bisect_left X = A[-1] for a in A: x = (X // a) * a i = bisect_left(A, x) while x > 0: ans -= (N - i) * a x -= a i = bisect_left(A, x) print(ans)