結果
問題 | No.750 Frac #1 |
ユーザー |
|
提出日時 | 2021-03-07 13:39:14 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 36 ms / 1,000 ms |
コード長 | 666 bytes |
コンパイル時間 | 1,091 ms |
コンパイル使用メモリ | 114,372 KB |
実行使用メモリ | 27,712 KB |
最終ジャッジ日時 | 2024-10-08 23:14:46 |
合計ジャッジ時間 | 3,562 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; using System.Collections.Generic; namespace _0750 { class Program { static void Main(string[] args) { var l = new List<(int, int, double)>(); var n = int.Parse(Console.ReadLine()); foreach(var i in Enumerable.Range(0, n)){ var s = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray(); l.Add((s[0], s[1], s[0] * 1.0 / s[1])); } foreach(var t in l.OrderByDescending(x => x.Item3)){ Console.WriteLine(string.Format("{0} {1}", t.Item1, t.Item2)); } } } }