結果
問題 |
No.722 100×100=1000
|
ユーザー |
![]() |
提出日時 | 2025-08-09 12:27:50 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,562 bytes |
コンパイル時間 | 1,001 ms |
コンパイル使用メモリ | 113,000 KB |
実行使用メモリ | 26,652 KB |
最終ジャッジ日時 | 2025-08-09 12:27:54 |
合計ジャッジ時間 | 2,783 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 WA * 2 |
コンパイルメッセージ
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 >= 10) { 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); } } }