結果
問題 |
No.3073 Fraction Median
|
ユーザー |
![]() |
提出日時 | 2025-03-21 22:47:45 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 208 bytes |
コンパイル時間 | 381 ms |
コンパイル使用メモリ | 83,024 KB |
実行使用メモリ | 276,496 KB |
最終ジャッジ日時 | 2025-03-21 22:47:55 |
合計ジャッジ時間 | 9,143 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 WA * 14 |
ソースコード
import math N=int(input()) A=list(map(int,input().split())) l=[1,0] 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]))