結果

問題 No.722 100×100=1000
ユーザー バカらっくバカらっく
提出日時 2018-08-04 22:47:40
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 1,993 bytes
コンパイル時間 3,785 ms
コンパイル使用メモリ 112,252 KB
実行使用メモリ 24,136 KB
最終ジャッジ日時 2023-08-28 15:49:50
合計ジャッジ時間 5,202 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
24,020 KB
testcase_01 AC 59 ms
22,028 KB
testcase_02 AC 58 ms
21,904 KB
testcase_03 AC 61 ms
24,032 KB
testcase_04 AC 59 ms
22,008 KB
testcase_05 AC 59 ms
24,056 KB
testcase_06 AC 60 ms
21,932 KB
testcase_07 AC 59 ms
21,888 KB
testcase_08 AC 58 ms
21,892 KB
testcase_09 AC 61 ms
24,064 KB
testcase_10 AC 59 ms
22,008 KB
testcase_11 AC 60 ms
21,908 KB
testcase_12 AC 59 ms
23,992 KB
testcase_13 AC 59 ms
24,004 KB
testcase_14 AC 59 ms
21,824 KB
testcase_15 AC 60 ms
21,956 KB
testcase_16 AC 59 ms
21,868 KB
testcase_17 AC 59 ms
21,876 KB
testcase_18 AC 59 ms
21,964 KB
testcase_19 AC 59 ms
22,036 KB
testcase_20 AC 59 ms
22,004 KB
testcase_21 AC 60 ms
24,136 KB
testcase_22 AC 59 ms
21,944 KB
testcase_23 AC 60 ms
21,908 KB
testcase_24 AC 59 ms
22,084 KB
testcase_25 AC 58 ms
23,964 KB
testcase_26 AC 58 ms
22,104 KB
testcase_27 AC 58 ms
21,956 KB
testcase_28 AC 58 ms
22,028 KB
testcase_29 AC 59 ms
24,024 KB
testcase_30 AC 59 ms
23,960 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()
    {
        long[] inpt = Reader.ReadLine().Split(' ').Select(a => long.Parse(a)).ToArray();

        if(IsAnsan(inpt)) {
            long ans = inpt[0] * inpt[1] / 10;
            Console.WriteLine(ans);
        } else {
            long ans = inpt[0] * inpt[1];
            if(Math.Abs(ans)> 99999999) {
                Console.WriteLine("E");
            } else {
                Console.WriteLine(ans);
            }
        }


    }

    private bool IsAnsan(long[] inpt) {
        foreach(int item in inpt) {
            if(item == 0) {
                return false;
            }
            string nokori;
            if(item < 0) {
                nokori = item.ToString().Substring(2);
            } else {
                nokori = item.ToString().Substring(1);
            }
            if(nokori.Length < 2) {
                return false;
            }
            if(nokori.Any(a=>a!='0')) {
                return false;
            }
        }
        return true;
    }


    private int[] GetIntArray() {
        return Reader.ReadLine().Trim().Split(' ').Select(a => int.Parse(a)).ToArray();
    }


    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 = @"



30000000 -70000000








";
    }

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