結果

問題 No.750 Frac #1
ユーザー knt3110knt3110
提出日時 2019-02-11 20:34:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 682 ms / 1,000 ms
コード長 358 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 50,540 KB
最終ジャッジ日時 2023-09-26 12:18:53
合計ジャッジ時間 9,383 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 682 ms
29,480 KB
testcase_01 AC 131 ms
29,456 KB
testcase_02 AC 132 ms
29,444 KB
testcase_03 AC 132 ms
29,548 KB
testcase_04 AC 132 ms
29,416 KB
testcase_05 AC 133 ms
29,536 KB
testcase_06 AC 134 ms
29,624 KB
testcase_07 AC 135 ms
29,632 KB
testcase_08 AC 132 ms
29,492 KB
testcase_09 AC 134 ms
29,592 KB
testcase_10 AC 135 ms
29,520 KB
testcase_11 AC 134 ms
29,404 KB
testcase_12 AC 133 ms
29,576 KB
testcase_13 AC 136 ms
29,592 KB
testcase_14 AC 134 ms
29,444 KB
testcase_15 AC 134 ms
29,480 KB
testcase_16 AC 133 ms
29,452 KB
testcase_17 AC 135 ms
29,644 KB
testcase_18 AC 129 ms
29,620 KB
testcase_19 AC 131 ms
29,576 KB
testcase_20 AC 133 ms
29,512 KB
testcase_21 AC 129 ms
29,540 KB
testcase_22 AC 130 ms
29,548 KB
testcase_23 AC 132 ms
29,568 KB
testcase_24 AC 130 ms
29,620 KB
testcase_25 AC 131 ms
29,620 KB
testcase_26 AC 132 ms
29,448 KB
testcase_27 AC 130 ms
29,596 KB
testcase_28 AC 132 ms
29,340 KB
testcase_29 AC 131 ms
29,540 KB
testcase_30 AC 134 ms
29,616 KB
testcase_31 AC 132 ms
29,376 KB
testcase_32 AC 132 ms
50,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

if __name__ == "__main__":
    # 入力部分
    n = int(input())
    AB = [[int(i) for i in input().split()] for j in range(n)]

    # 本体
    F = np.zeros(n)
    for i in range(len(AB)):
        F[i] = AB[i][0] / AB[i][1]
    F_index = np.argsort(F)[::-1]

    # 出力部分
    for j in F_index:
        print(AB[j][0], AB[j][1])
0