結果

問題 No.750 Frac #1
ユーザー 学ぶマン
提出日時 2025-04-25 18:07:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 1,000 ms
コード長 233 bytes
コンパイル時間 563 ms
コンパイル使用メモリ 82,448 KB
実行使用メモリ 53,632 KB
最終ジャッジ日時 2025-04-25 18:07:51
合計ジャッジ時間 2,950 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
C = 9*8*7*6*5
record = []

nums = []
for i in range(N):
    a, b = map(int, input().split())
    record.append((a*C//b, i))
    nums.append((a, b))

record.sort(reverse=True)

for _, i in record:
    print(*nums[i])
0