結果
問題 | No.736 約比 |
ユーザー |
![]() |
提出日時 | 2018-09-28 23:34:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 614 bytes |
コンパイル時間 | 130 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-10-12 07:22:51 |
合計ジャッジ時間 | 3,444 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 65 |
ソースコード
# -*- coding: utf-8 -*- # !/usr/bin/env python # vim: set fileencoding=utf-8 : """ # # Author: Noname # URL: https://github.com/pettan0818 # License: MIT License # Created: 金 9/28 21:35:38 2018 # Usage # """ import math from functools import reduce def get(): _ = input() return [int(i) for i in input().split(' ')] def solve(nums): """ >>> solve([24,30,36]) >>> solve([12,18,30,42,66]) >>> solve([9,12,16]) """ gcd = int(reduce(math.gcd, nums)) res = [str(int(i//gcd)) for i in nums] print(':'.join(res) + '\n') if __name__ == '__main__': solve(get())