結果
| 問題 | No.138 化石のバージョン |
| コンテスト | |
| ユーザー |
the10hours
|
| 提出日時 | 2015-06-11 11:42:16 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 5,000 ms |
| コード長 | 1,213 bytes |
| 記録 | |
| コンパイル時間 | 1,111 ms |
| コンパイル使用メモリ | 110,520 KB |
| 実行使用メモリ | 26,144 KB |
| 最終ジャッジ日時 | 2024-12-29 13:23:43 |
| 合計ジャッジ時間 | 3,279 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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[] num1 = new int[3];
int[] num2 = new int[3];
bool end = false;
for (int i = 0; i < 3; i++)
{
num1[i] = int.Parse(str1[i]);
num2[i] = int.Parse(str2[i]);
}
if (num1[0] == num2[0] & num1[1] == num2[1] & num1[2] == num2[2])
{
Console.WriteLine("YES");
end = true;
}
if (!end)
{
for (int i = 0; i < 3; i++)
{
if (num1[i] > num2[i])
{
Console.WriteLine("YES");
break;
}
else if (num1[i] < num2[i])
{
Console.WriteLine("NO");
break;
}
}
}
}
}
}
the10hours