結果
| 問題 | No.3073 Fraction Median |
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2025-03-21 22:48:13 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 483 ms / 2,500 ms |
| + 37µs | |
| コード長 | 217 bytes |
| 記録 | |
| コンパイル時間 | 423 ms |
| コンパイル使用メモリ | 64,048 KB |
| 実行使用メモリ | 228,624 KB |
| 最終ジャッジ日時 | 2026-11-11 04:46:58 |
| 合計ジャッジ時間 | 11,907 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
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