結果
問題 | No.138 化石のバージョン |
ユーザー |
![]() |
提出日時 | 2015-06-11 09:41:48 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 5,000 ms |
コード長 | 1,209 bytes |
コンパイル時間 | 1,155 ms |
コンパイル使用メモリ | 107,516 KB |
実行使用メモリ | 26,272 KB |
最終ジャッジ日時 | 2024-12-29 13:23:34 |
合計ジャッジ時間 | 3,023 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
コンパイルメッセージ
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; using System.Text; namespace yukicoder { class yc { static void Main() { string[] str1 = Console.ReadLine().Split('.'); string[] str2 = Console.ReadLine().Split('.'); int[] kaseki = new int[3]; int[] judge = new int[3]; for (int i = 0; i < 3; i++) { kaseki[i] = int.Parse(str1[i]); judge[i] = int.Parse(str2[i]); } if (kaseki[0] < judge[0]) { Console.WriteLine("NO"); } else if (kaseki[0] == judge[0]) { if (kaseki[1] < judge[1]) { Console.WriteLine("NO"); } else if (kaseki[1] == judge[1]) { if (kaseki[2] < judge[2]) { Console.WriteLine("NO"); } else Console.WriteLine("YES"); } else Console.WriteLine("YES"); } else Console.WriteLine("YES"); } } }