結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
kou_kkk
|
| 提出日時 | 2025-08-09 12:29:00 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 2,000 ms |
| コード長 | 1,562 bytes |
| コンパイル時間 | 1,013 ms |
| コンパイル使用メモリ | 113,268 KB |
| 実行使用メモリ | 26,664 KB |
| 最終ジャッジ日時 | 2025-08-09 12:29:03 |
| 合計ジャッジ時間 | 3,117 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
using System.Collections.Generic;
class Program
{
static void Main()
{
var arr = Console.ReadLine().Trim().Split(' ');
var a = long.Parse(arr[0]);
var b = long.Parse(arr[1]);
string x;
var xs = new List<string>();
foreach (var s in arr)
{
if (s[0] == '-')
{
x = s[1..];
}
else
{
x = s;
}
if (x.Length >= 3)
{
xs.Add(x[1..]);
}
}
var flg = true;
flg = flg && (xs.Count == 2);
if (flg)
{
var cs = (xs[0] + xs[1]).ToCharArray();
foreach (var c in cs)
{
flg = flg && (c == '0');
}
}
if (flg)
{
Console.WriteLine(a * b / 10);
}
else
{
string ans;
if (arr[0].Length + arr[1].Length >= 12)
{
ans = "E";
}
else
{
var y = a * b;
if (y > 99999999)
{
ans = "E";
}
else if (y < -99999999)
{
ans = "E";
}
else
{
ans = y.ToString();
}
}
Console.WriteLine(ans);
}
}
}
kou_kkk