結果

問題 No.750 Frac #1
ユーザー maspy
提出日時 2020-01-06 09:45:14
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 37 ms / 1,000 ms
コード長 323 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-11-22 23:48:40
合計ジャッジ時間 2,192 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

from fractions import Fraction

N = int(readline())
m = map(int,read().split())
AB = zip(m,m)

AB = sorted(AB, key = lambda x : x[0] / x[1], reverse=True)

print('\n'.join(' '.join(map(str,x)) for x in AB))
0