結果

問題 No.138 化石のバージョン
ユーザー the10hoursthe10hours
提出日時 2015-06-11 11:17:47
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,463 bytes
コンパイル時間 2,756 ms
コンパイル使用メモリ 102,820 KB
実行使用メモリ 22,964 KB
最終ジャッジ日時 2023-09-20 20:45:35
合計ジャッジ時間 6,205 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,796 KB
testcase_01 AC 56 ms
20,852 KB
testcase_02 AC 56 ms
22,964 KB
testcase_03 AC 56 ms
22,764 KB
testcase_04 AC 56 ms
22,832 KB
testcase_05 AC 56 ms
22,900 KB
testcase_06 AC 56 ms
22,832 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 56 ms
22,792 KB
testcase_10 AC 56 ms
22,792 KB
testcase_11 AC 56 ms
22,840 KB
testcase_12 WA -
testcase_13 AC 56 ms
22,768 KB
testcase_14 WA -
testcase_15 AC 56 ms
22,864 KB
testcase_16 AC 56 ms
20,768 KB
testcase_17 AC 57 ms
20,860 KB
testcase_18 AC 55 ms
20,740 KB
testcase_19 AC 56 ms
20,816 KB
testcase_20 AC 56 ms
20,724 KB
testcase_21 AC 56 ms
20,796 KB
testcase_22 AC 57 ms
22,764 KB
testcase_23 AC 56 ms
20,816 KB
testcase_24 AC 57 ms
20,800 KB
testcase_25 AC 56 ms
20,916 KB
testcase_26 AC 57 ms
20,728 KB
testcase_27 AC 56 ms
22,872 KB
testcase_28 AC 55 ms
20,808 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 56 ms
20,720 KB
testcase_33 WA -
testcase_34 AC 60 ms
20,652 KB
testcase_35 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

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");
        }
    }
}
0