結果

問題 No.750 Frac #1
ユーザー mkawa2mkawa2
提出日時 2021-11-18 22:05:22
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 249 ms / 1,000 ms
コード長 831 bytes
コンパイル時間 1,049 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 89,796 KB
最終ジャッジ日時 2023-08-27 16:33:34
合計ジャッジ時間 11,179 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 243 ms
89,704 KB
testcase_01 AC 237 ms
89,716 KB
testcase_02 AC 235 ms
89,796 KB
testcase_03 AC 241 ms
89,596 KB
testcase_04 AC 239 ms
89,648 KB
testcase_05 AC 241 ms
89,636 KB
testcase_06 AC 236 ms
89,788 KB
testcase_07 AC 232 ms
89,724 KB
testcase_08 AC 235 ms
89,700 KB
testcase_09 AC 239 ms
89,784 KB
testcase_10 AC 237 ms
89,544 KB
testcase_11 AC 237 ms
89,556 KB
testcase_12 AC 238 ms
89,632 KB
testcase_13 AC 238 ms
89,704 KB
testcase_14 AC 239 ms
89,608 KB
testcase_15 AC 241 ms
89,424 KB
testcase_16 AC 240 ms
89,480 KB
testcase_17 AC 243 ms
89,616 KB
testcase_18 AC 241 ms
89,712 KB
testcase_19 AC 242 ms
89,644 KB
testcase_20 AC 235 ms
89,632 KB
testcase_21 AC 235 ms
89,696 KB
testcase_22 AC 236 ms
89,608 KB
testcase_23 AC 238 ms
89,736 KB
testcase_24 AC 249 ms
89,664 KB
testcase_25 AC 242 ms
89,712 KB
testcase_26 AC 239 ms
89,728 KB
testcase_27 AC 238 ms
89,532 KB
testcase_28 AC 240 ms
89,564 KB
testcase_29 AC 236 ms
89,576 KB
testcase_30 AC 236 ms
89,792 KB
testcase_31 AC 235 ms
89,544 KB
testcase_32 AC 236 ms
89,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

# sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
# inf = 18446744073709551615
inf = 4294967295
md = 10**9+7
# md = 998244353

from fractions import Fraction

n = II()
ff = []
for _ in range(n):
    a, b = LI()
    ff.append((Fraction(a, b), a, b))

for f, a, b in sorted(ff, reverse=True):
    print(a, b)
0