結果
問題 | No.138 化石のバージョン |
ユーザー |
|
提出日時 | 2022-07-10 10:20:43 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 765 bytes |
コンパイル時間 | 2,759 ms |
コンパイル使用メモリ | 113,008 KB |
実行使用メモリ | 27,936 KB |
最終ジャッジ日時 | 2025-01-02 17:33:53 |
合計ジャッジ時間 | 5,187 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 WA * 7 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; namespace SortItems { class Program { static void Main(string[] args) { var a = Console.ReadLine().Split('.').Select(int.Parse).ToList(); var b = Console.ReadLine().Split('.').Select(int.Parse).ToList(); if (a[0] < b[0]) { Console.WriteLine("NO"); return; } else { for (var i = 0; i < 3; i++) { if (a[i] > b[i]) { Console.WriteLine("YES"); return; } } } Console.WriteLine("NO"); } } }