結果
| 問題 |
No.750 Frac #1
|
| コンテスト | |
| ユーザー |
fV9TwBhUoa9S3eV
|
| 提出日時 | 2019-09-25 16:12:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 1,000 ms |
| コード長 | 358 bytes |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-22 07:48:11 |
| 合計ジャッジ時間 | 2,072 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
# No.750 Frac #1
n = int(input())
a = []
b = []
quotients = []
for i in range(n):
x, y = [int(j) for j in input().split()]
a.append(x)
b.append(y)
quotients.append(a[i] / b[i])
quotients_sorted = sorted(quotients, reverse = True)
for i in range(n):
idx = quotients.index(quotients_sorted[i])
print('{0} {1}'.format(a[idx], b[idx]))
fV9TwBhUoa9S3eV