結果

問題 No.750 Frac #1
ユーザー Maboy
提出日時 2021-06-17 19:23:48
言語 Swift
(6.0.3)
結果
AC  
実行時間 7 ms / 1,000 ms
コード長 237 bytes
コンパイル時間 11,592 ms
コンパイル使用メモリ 135,764 KB
実行使用メモリ 10,112 KB
最終ジャッジ日時 2025-01-03 09:35:13
合計ジャッジ時間 12,645 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

let N = Int(readLine()!)
var dict = [Double:String]()
for _ in 0...N! - 1{
    let S = readLine()!
    let s = S.split(separator: " ").map{Double($0)!}
    dict[Double(s[0] / s[1])] = S
}
for i in dict.sorted(by: >){
    print(i.value)
}
0