結果
| 問題 |
No.3073 Fraction Median
|
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2025-03-21 22:48:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 642 ms / 2,500 ms |
| コード長 | 217 bytes |
| コンパイル時間 | 282 ms |
| コンパイル使用メモリ | 82,488 KB |
| 実行使用メモリ | 276,416 KB |
| 最終ジャッジ日時 | 2025-03-21 22:48:26 |
| 合計ジャッジ時間 | 11,540 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
import math
N=int(input())
A=list(map(int,input().split()))
l=[1,0]
A.sort()
for i in range(N-1):
n=(A[i+1],A[i])
if n[1]*l[0]>=l[1]*n[0]:
l=n
print(l[1]//math.gcd(l[0],l[1]),l[0]//math.gcd(l[0],l[1]))
nikoro256