結果
| 問題 |
No.1917 LCMST
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-16 00:03:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 230 bytes |
| コンパイル時間 | 508 ms |
| コンパイル使用メモリ | 82,240 KB |
| 実行使用メモリ | 224,900 KB |
| 最終ジャッジ日時 | 2025-04-16 00:05:17 |
| 合計ジャッジ時間 | 16,023 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 33 |
ソースコード
import math
n = int(input())
a = list(map(int, input().split()))
m = min(a)
count_m = a.count(m)
total = (count_m - 1) * m
for num in a:
if num != m:
g = math.gcd(m, num)
total += (m * num) // g
print(total)
lam6er