結果
問題 | No.750 Frac #1 |
ユーザー |
![]() |
提出日時 | 2020-02-10 12:30:43 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 29 ms / 1,000 ms |
コード長 | 543 bytes |
コンパイル時間 | 1,025 ms |
コンパイル使用メモリ | 110,904 KB |
実行使用メモリ | 19,584 KB |
最終ジャッジ日時 | 2024-10-01 06:20:31 |
合計ジャッジ時間 | 2,581 ms |
ジャッジサーバーID (参考情報) |
judge2 / 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; static class NagataKanaIsAGenius { public static void Main() { foreach(var(x,y) in Enumerable.Range(0,int.Parse(Console.ReadLine())) .Select(_=>{ int[]ab=Console.ReadLine().Split().Select(int.Parse).ToArray(); return new Tuple<int,int>(ab[0],ab[1]); }) .OrderBy(x=>-(double)x.Item1/x.Item2) .ToArray() ) { Console.WriteLine($"{x} {y}"); } } }