結果
問題 |
No.1917 LCMST
|
ユーザー |
![]() |
提出日時 | 2025-06-12 21:11:45 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 228 bytes |
コンパイル時間 | 336 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 223,108 KB |
最終ジャッジ日時 | 2025-06-12 21:13:41 |
合計ジャッジ時間 | 15,572 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 33 |
ソースコード
import math n = int(input()) A = list(map(int, input().split())) m = min(A) k = A.count(m) total = 0 for x in A: if x == m: continue g = math.gcd(m, x) total += (m * x) // g total += (k - 1) * m print(total)