結果

問題 No.750 Frac #1
ユーザー maspymaspy
提出日時 2020-01-06 09:40:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 9,948 KB
最終ジャッジ日時 2023-08-14 22:34:15
合計ジャッジ時間 2,346 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
9,520 KB
testcase_01 AC 29 ms
9,680 KB
testcase_02 WA -
testcase_03 AC 28 ms
9,740 KB
testcase_04 AC 26 ms
9,752 KB
testcase_05 AC 28 ms
9,576 KB
testcase_06 WA -
testcase_07 AC 28 ms
9,664 KB
testcase_08 AC 29 ms
9,680 KB
testcase_09 AC 27 ms
9,660 KB
testcase_10 AC 28 ms
9,632 KB
testcase_11 WA -
testcase_12 AC 27 ms
9,732 KB
testcase_13 AC 26 ms
9,688 KB
testcase_14 AC 26 ms
9,652 KB
testcase_15 AC 27 ms
9,732 KB
testcase_16 AC 26 ms
9,660 KB
testcase_17 AC 26 ms
9,756 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 27 ms
9,616 KB
testcase_21 AC 27 ms
9,632 KB
testcase_22 AC 27 ms
9,844 KB
testcase_23 AC 28 ms
9,572 KB
testcase_24 WA -
testcase_25 AC 27 ms
9,756 KB
testcase_26 WA -
testcase_27 AC 26 ms
9,516 KB
testcase_28 AC 26 ms
9,676 KB
testcase_29 AC 25 ms
9,756 KB
testcase_30 AC 27 ms
9,572 KB
testcase_31 WA -
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

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)

fracs = sorted((Fraction(x,y) for x,y in AB), reverse=True)

for x in fracs:
    print(x.numerator, x.denominator)
0