結果
| 問題 | No.3073 Fraction Median |
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2025-03-21 22:48:13 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 453 ms / 2,500 ms |
| コード長 | 217 bytes |
| 記録 | |
| コンパイル時間 | 223 ms |
| コンパイル使用メモリ | 96,488 KB |
| 実行使用メモリ | 326,404 KB |
| 最終ジャッジ日時 | 2026-07-07 15:55:41 |
| 合計ジャッジ時間 | 9,099 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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