結果
| 問題 |
No.1917 LCMST
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 20:54:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 176 bytes |
| コンパイル時間 | 186 ms |
| コンパイル使用メモリ | 81,916 KB |
| 実行使用メモリ | 224,692 KB |
| 最終ジャッジ日時 | 2025-06-12 20:58:10 |
| 合計ジャッジ時間 | 16,938 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 33 |
ソースコード
import math
n = int(input())
A = list(map(int, input().split()))
m = min(A)
sum_total = 0
for a in A:
g = math.gcd(m, a)
sum_total += (m * a) // g
print(sum_total - m)
gew1fw