結果
| 問題 | No.3073 Fraction Median |
| ユーザー |
|
| 提出日時 | 2025-03-21 22:15:04 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 524 ms / 2,500 ms |
| + 138µs | |
| コード長 | 497 bytes |
| 記録 | |
| コンパイル時間 | 77 ms |
| コンパイル使用メモリ | 64,680 KB |
| 実行使用メモリ | 241,508 KB |
| 最終ジャッジ日時 | 2026-11-11 04:43:06 |
| 合計ジャッジ時間 | 13,514 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
input = sys.stdin.readline
n = int(input())
a = list(map(int,input().split()))
#alist = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
# alist.append(list(map(int,input().split())))
a.sort()
x,y = 0,1
for i in range(n-1):
z,w = a[i],a[i+1]
if x*w < z*y:
x,y = z,w
g = math.gcd(x,y)
print(x//g,y//g)