結果
| 問題 | No.3073 Fraction Median |
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2025-03-22 03:03:22 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 813 ms / 2,500 ms |
| + 928µs | |
| コード長 | 301 bytes |
| 記録 | |
| コンパイル時間 | 1,436 ms |
| コンパイル使用メモリ | 64,016 KB |
| 実行使用メモリ | 228,756 KB |
| 最終ジャッジ日時 | 2026-11-11 04:52:42 |
| 合計ジャッジ時間 | 16,881 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge7_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
from math import gcd
class Fraction:
def __init__(self,x,y):
g=gcd(x,y)
self.x=x//g
self.y=y//g
def __lt__(self,other):
return self.x*other.y<self.y*other.x
n=int(input())
a=sorted(list(map(int,input().split())))
f=max(Fraction(a[i],a[i+1]) for i in range(n-1))
print(f.x,f.y)
sasa8uyauya