結果
| 問題 |
No.1917 LCMST
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 21:09:20 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 228 bytes |
| コンパイル時間 | 667 ms |
| コンパイル使用メモリ | 81,792 KB |
| 実行使用メモリ | 222,768 KB |
| 最終ジャッジ日時 | 2025-06-12 21:10:40 |
| 合計ジャッジ時間 | 19,059 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 = m * (k - 1)
for num in a:
if num == m:
continue
g = math.gcd(m, num)
total += (m * num) // g
print(total)
gew1fw