結果

問題 No.668 6.0*10^23
ユーザー NoNo
提出日時 2018-03-25 12:40:47
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 682 bytes
コンパイル時間 3,516 ms
コンパイル使用メモリ 99,696 KB
実行使用メモリ 28,456 KB
最終ジャッジ日時 2023-09-12 17:51:40
合計ジャッジ時間 9,571 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
26,344 KB
testcase_01 AC 109 ms
26,384 KB
testcase_02 AC 105 ms
26,148 KB
testcase_03 AC 106 ms
26,228 KB
testcase_04 AC 106 ms
26,332 KB
testcase_05 AC 106 ms
28,388 KB
testcase_06 AC 105 ms
28,284 KB
testcase_07 AC 105 ms
28,432 KB
testcase_08 AC 103 ms
26,088 KB
testcase_09 AC 107 ms
28,176 KB
testcase_10 AC 106 ms
26,336 KB
testcase_11 AC 110 ms
28,424 KB
testcase_12 AC 109 ms
26,348 KB
testcase_13 AC 108 ms
28,336 KB
testcase_14 AC 110 ms
28,400 KB
testcase_15 AC 106 ms
28,372 KB
testcase_16 AC 105 ms
26,316 KB
testcase_17 AC 111 ms
26,452 KB
testcase_18 AC 106 ms
26,532 KB
testcase_19 AC 106 ms
28,456 KB
testcase_20 AC 104 ms
26,304 KB
testcase_21 AC 105 ms
28,364 KB
testcase_22 AC 105 ms
26,196 KB
testcase_23 AC 104 ms
24,100 KB
testcase_24 AC 107 ms
26,340 KB
testcase_25 AC 106 ms
26,148 KB
testcase_26 AC 105 ms
28,184 KB
testcase_27 AC 105 ms
26,204 KB
testcase_28 AC 105 ms
24,404 KB
testcase_29 AC 105 ms
28,272 KB
testcase_30 AC 104 ms
24,456 KB
testcase_31 AC 106 ms
26,148 KB
testcase_32 AC 107 ms
28,264 KB
testcase_33 AC 106 ms
26,176 KB
testcase_34 AC 104 ms
24,156 KB
testcase_35 AC 105 ms
26,280 KB
testcase_36 AC 106 ms
24,192 KB
testcase_37 AC 106 ms
26,216 KB
testcase_38 AC 106 ms
26,300 KB
testcase_39 AC 110 ms
28,232 KB
testcase_40 AC 105 ms
26,396 KB
testcase_41 AC 104 ms
26,232 KB
testcase_42 AC 104 ms
26,208 KB
testcase_43 AC 105 ms
24,380 KB
testcase_44 AC 105 ms
28,412 KB
testcase_45 AC 104 ms
28,264 KB
testcase_46 AC 104 ms
26,248 KB
testcase_47 AC 106 ms
26,292 KB
testcase_48 AC 109 ms
28,388 KB
testcase_49 AC 105 ms
26,440 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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.Text.RegularExpressions;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            string n = Console.ReadLine();
            string f = n.Substring(0, 3);

            Double a = 0;
            if (Regex.IsMatch(f, "99[5-9]"))
            {
                a = 1.0;
                Console.WriteLine(a.ToString("0.0") + "*10^" + (n.Length).ToString());
            }
            else
            {
                a = Math.Round(double.Parse(f) / 10, MidpointRounding.AwayFromZero) / 10d;
                Console.WriteLine(a.ToString("0.0") + "*10^" + (n.Length - 1).ToString());
            }
        }
    }
}
0