結果
問題 | No.446 ゆきこーだーの雨と雪 (1) |
ユーザー | 14番 |
提出日時 | 2016-11-18 22:33:21 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 59 ms / 2,000 ms |
コード長 | 1,315 bytes |
コンパイル時間 | 2,241 ms |
コンパイル使用メモリ | 105,960 KB |
実行使用メモリ | 23,600 KB |
最終ジャッジ日時 | 2023-08-17 11:02:42 |
合計ジャッジ時間 | 4,078 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 52 ms
21,280 KB |
testcase_01 | AC | 57 ms
21,472 KB |
testcase_02 | AC | 52 ms
21,308 KB |
testcase_03 | AC | 58 ms
21,496 KB |
testcase_04 | AC | 53 ms
21,268 KB |
testcase_05 | AC | 53 ms
21,192 KB |
testcase_06 | AC | 58 ms
21,496 KB |
testcase_07 | AC | 59 ms
21,520 KB |
testcase_08 | AC | 58 ms
23,600 KB |
testcase_09 | AC | 59 ms
21,568 KB |
testcase_10 | AC | 53 ms
23,348 KB |
testcase_11 | AC | 52 ms
21,328 KB |
testcase_12 | AC | 59 ms
23,564 KB |
testcase_13 | AC | 58 ms
21,472 KB |
testcase_14 | AC | 59 ms
21,504 KB |
testcase_15 | AC | 59 ms
21,576 KB |
testcase_16 | AC | 59 ms
21,484 KB |
コンパイルメッセージ
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.Text; using System.Collections.Generic; public class Program { public void Proc() { Reader.IsDebug = false; int max = 12345; List<string> inpt = new List<string>(); inpt.Add(Reader.ReadLine()); inpt.Add(Reader.ReadLine()); bool ans = true; if(inpt.Any(a=>a.Any(b=>b<'0' || b>'9'))) { ans = false; } if(ans && inpt.Any(a=>!int.Parse(a).ToString().Equals(a))) { ans = false; } if(ans && inpt.Any(a=>int.Parse(a) > max)) { ans = false; } Console.WriteLine(ans?"OK":"NG"); } public class Reader { public static bool IsDebug = true; private static System.IO.StringReader SReader; private static string InitText = @" 123 4eF "; public static string ReadLine() { if(IsDebug) { if(SReader == null) { SReader = new System.IO.StringReader(InitText.Trim()); } return SReader.ReadLine(); } else { return Console.ReadLine(); } } } public static void Main(string[] args) { Program prg = new Program(); prg.Proc(); } }