結果
問題 |
No.1917 LCMST
|
ユーザー |
![]() |
提出日時 | 2025-03-31 17:41:23 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 299 bytes |
コンパイル時間 | 490 ms |
コンパイル使用メモリ | 82,816 KB |
実行使用メモリ | 224,800 KB |
最終ジャッジ日時 | 2025-03-31 17:43:06 |
合計ジャッジ時間 | 18,377 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 33 |
ソースコード
import sys import math def main(): input = sys.stdin.read().split() n = int(input[0]) a = list(map(int, input[1:n+1])) m = min(a) total = 0 for num in a: g = math.gcd(m, num) total += (m * num) // g print(total - m) if __name__ == "__main__": main()