結果

問題 No.750 Frac #1
ユーザー nebukuro09
提出日時 2018-11-09 21:22:04
言語 Python2
(2.7.18)
結果
AC  
実行時間 22 ms / 1,000 ms
コード長 212 bytes
コンパイル時間 690 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 8,192 KB
最終ジャッジ日時 2024-11-21 05:23:44
合計ジャッジ時間 2,442 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import Fraction as F
N = input()
A = []
for i in xrange(N):
    a, b = map(int, raw_input().split())
    A.append((F(a, b), a, b))
A.sort()
for i in xrange(N-1, -1, -1):
    print A[i][1], A[i][2]
0