結果
問題 | No.722 100×100=1000 |
ユーザー |
![]() |
提出日時 | 2020-09-15 18:27:17 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 810 bytes |
コンパイル時間 | 1,800 ms |
コンパイル使用メモリ | 113,032 KB |
実行使用メモリ | 28,132 KB |
最終ジャッジ日時 | 2024-06-22 01:52:49 |
合計ジャッジ時間 | 3,551 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 24 WA * 3 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using static System.Math; using System; public class Hello { static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var a = int.Parse(line[0]); var b = int.Parse(line[1]); if (check(a) && check(b)) anzan(a, b); else dentaku(a, b); } static void dentaku(int a, int b) { long ans = a * (long)b; var keta = Abs(ans).ToString().Length; if (keta > 8) Console.WriteLine("E"); else Console.WriteLine(ans); } static void anzan(int a, int b) { long ans = a * (long)b / 10L; Console.WriteLine(ans); } static bool check(int a) { a = Abs(a); if (a % 100 != 0) return false; var ap100 = a / 100; return (ap100 >= 1 | ap100 <= 9); } }