結果
| 問題 |
No.138 化石のバージョン
|
| コンテスト | |
| ユーザー |
the10hours
|
| 提出日時 | 2015-06-11 11:17:47 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,463 bytes |
| コンパイル時間 | 886 ms |
| コンパイル使用メモリ | 108,276 KB |
| 実行使用メモリ | 28,176 KB |
| 最終ジャッジ日時 | 2024-07-06 15:33:28 |
| 合計ジャッジ時間 | 2,857 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 9 |
コンパイルメッセージ
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];
double ksum = 0,jsum = 0;
double powten = 1;
double[] kd = new double[3];
double[] jd = new double[3];
for (int i = 0; i < 3; i++)
{
kaseki[i] = int.Parse(str1[i]);
judge[i] = int.Parse(str2[i]);
}
for (int i = 0; i < 3; i++)
{
kd[i] = kaseki[i];
jd[i] = judge[i];
for (int j = 1; j < kaseki.Length - i; j++)
{
powten *= 10;
}
for (int k = 0; k < kaseki[i].ToString().Length-1; k++)
{
kd[i] = kd[i] / 10;
}
for (int m = 0; m < judge[i].ToString().Length - 1; m++)
{
jd[i] = jd[i] / 10;
}
ksum += kd[i] * powten;
jsum += jd[i] * powten;
powten = 1;
}
if (ksum < jsum) Console.WriteLine("NO");
else Console.WriteLine("YES");
}
}
}
the10hours