結果

問題 No.668 6.0*10^23
ユーザー バカらっくバカらっく
提出日時 2018-03-25 23:19:11
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 1,496 bytes
コンパイル時間 4,811 ms
コンパイル使用メモリ 106,084 KB
実行使用メモリ 23,404 KB
最終ジャッジ日時 2023-09-12 17:52:50
合計ジャッジ時間 7,662 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
23,256 KB
testcase_01 AC 66 ms
21,300 KB
testcase_02 AC 66 ms
23,232 KB
testcase_03 AC 65 ms
21,256 KB
testcase_04 AC 66 ms
23,232 KB
testcase_05 AC 67 ms
19,132 KB
testcase_06 AC 65 ms
21,352 KB
testcase_07 AC 64 ms
23,272 KB
testcase_08 AC 65 ms
21,208 KB
testcase_09 AC 64 ms
23,264 KB
testcase_10 AC 65 ms
21,304 KB
testcase_11 AC 66 ms
21,280 KB
testcase_12 AC 68 ms
23,236 KB
testcase_13 AC 65 ms
21,224 KB
testcase_14 AC 66 ms
21,304 KB
testcase_15 AC 67 ms
21,356 KB
testcase_16 AC 67 ms
23,256 KB
testcase_17 AC 65 ms
19,092 KB
testcase_18 AC 65 ms
23,296 KB
testcase_19 AC 67 ms
21,196 KB
testcase_20 AC 66 ms
21,364 KB
testcase_21 AC 66 ms
23,280 KB
testcase_22 AC 67 ms
23,312 KB
testcase_23 AC 67 ms
23,236 KB
testcase_24 AC 65 ms
21,196 KB
testcase_25 AC 65 ms
21,264 KB
testcase_26 AC 65 ms
21,224 KB
testcase_27 AC 65 ms
21,272 KB
testcase_28 AC 72 ms
21,364 KB
testcase_29 AC 65 ms
21,172 KB
testcase_30 AC 66 ms
21,188 KB
testcase_31 AC 66 ms
21,268 KB
testcase_32 AC 66 ms
23,404 KB
testcase_33 AC 65 ms
21,216 KB
testcase_34 AC 66 ms
23,268 KB
testcase_35 AC 65 ms
23,256 KB
testcase_36 AC 65 ms
21,148 KB
testcase_37 AC 67 ms
23,300 KB
testcase_38 AC 67 ms
23,192 KB
testcase_39 AC 67 ms
21,180 KB
testcase_40 AC 66 ms
21,356 KB
testcase_41 AC 66 ms
23,252 KB
testcase_42 AC 66 ms
21,276 KB
testcase_43 AC 66 ms
23,292 KB
testcase_44 AC 66 ms
21,220 KB
testcase_45 AC 63 ms
21,208 KB
testcase_46 AC 64 ms
21,260 KB
testcase_47 AC 64 ms
21,284 KB
testcase_48 AC 63 ms
21,252 KB
testcase_49 AC 64 ms
21,232 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.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;

public class Program
{

    public void Proc()
    {
        string inpt = Reader.ReadLine();

        if (inpt.Length == 1)
        {
            Console.WriteLine(inpt[0] + ".0*10^1");
            return;
        }
        if (inpt.Length <= 2)
        {
            Console.WriteLine(inpt[0] + "." + inpt[1] + "*10^2");
            return;
        }

        decimal left = decimal.Parse(inpt.Substring(0, 3)) / 10;
        left = Math.Round(left, MidpointRounding.AwayFromZero) / 10;
        int sisu = inpt.Length - 1;
        if (left >= 10)
        {
            left = left / 10;
            sisu++;
        }

        Console.WriteLine(left.ToString("0.0") + "*10^" + sisu);
    }







    public class Reader
    {
        static StringReader sr;
        public static bool IsDebug = false;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (sr == null)
                {
                    sr = new StringReader(InputText.Trim());
                }
                return sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        private static string InputText = @"




";
    }

    public static void Main(string[] args)
    {
#if DEBUG
        Reader.IsDebug = true;
#endif
        Program prg = new Program();
        prg.Proc();
    }
}
0