結果

問題 No.750 Frac #1
ユーザー pluto77
提出日時 2018-11-10 15:37:38
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 1,000 ms
コード長 211 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-24 12:53:21
合計ジャッジ時間 1,289 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki750

n=int(raw_input())
ab=[]
for i in xrange(n):
 a,b=map(int,raw_input().split())
 ab.append([a,b])
res=sorted(ab,key=lambda x:(1.0*x[0]/x[1]),reverse=True)
for i in xrange(n):
 print res[i][0],res[i][1]
0