結果
問題 | No.736 約比 |
ユーザー |
![]() |
提出日時 | 2019-10-25 10:51:33 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 2,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-19 07:14:23 |
合計ジャッジ時間 | 3,875 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 65 |
ソースコード
# No.736 約比 from math import gcd n = int(input()) a = [int(s) for s in input().split()] greatest_common_divisor = a[0] for i in range(1, n): greatest_common_divisor = gcd(greatest_common_divisor, a[i]) tmp = str(a[0] // greatest_common_divisor) for i in range(1, n): tmp += ':' + str(a[i] // greatest_common_divisor) print(tmp)