結果
| 問題 | 
                            No.750 Frac #1
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-07-12 13:36:22 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 37 ms / 1,000 ms | 
| コード長 | 289 bytes | 
| コンパイル時間 | 96 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 11,520 KB | 
| 最終ジャッジ日時 | 2024-09-14 03:32:58 | 
| 合計ジャッジ時間 | 2,606 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 30 | 
ソースコード
from fractions import Fraction
def main():
    N = int(input())
    A = []
    for i in range(N):
        a, b = map(int, input().split())
        A.append((Fraction(a, b), a, b))
    A.sort(reverse=True)
    for a, b, c in A:
        print(b, c)
if __name__ == '__main__':
    main()