結果
問題 | No.446 ゆきこーだーの雨と雪 (1) |
ユーザー | _matumo_ |
提出日時 | 2018-08-27 09:14:13 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 742 bytes |
コンパイル時間 | 2,211 ms |
コンパイル使用メモリ | 102,496 KB |
実行使用メモリ | 23,560 KB |
最終ジャッジ日時 | 2023-09-13 19:30:33 |
合計ジャッジ時間 | 4,130 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 56 ms
21,516 KB |
testcase_01 | AC | 56 ms
21,448 KB |
testcase_02 | AC | 51 ms
21,244 KB |
testcase_03 | AC | 55 ms
21,452 KB |
testcase_04 | AC | 51 ms
23,340 KB |
testcase_05 | AC | 52 ms
23,284 KB |
testcase_06 | AC | 55 ms
21,436 KB |
testcase_07 | AC | 51 ms
23,212 KB |
testcase_08 | AC | 55 ms
21,516 KB |
testcase_09 | AC | 50 ms
19,204 KB |
testcase_10 | AC | 55 ms
21,396 KB |
testcase_11 | AC | 51 ms
21,196 KB |
testcase_12 | AC | 51 ms
21,180 KB |
testcase_13 | AC | 56 ms
21,396 KB |
testcase_14 | AC | 56 ms
23,560 KB |
testcase_15 | AC | 56 ms
23,488 KB |
testcase_16 | AC | 56 ms
21,492 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.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static bool IsNum(string S) { if (S.Any(c => c < '0' || c > '9')) return false; if (S.Length == 1) return true; if (S[0] == '0') return false; if (Int16.Parse(S) > 12345) return false; return true; } static void Main(string[] args) { string a = Console.ReadLine(); string b = Console.ReadLine(); string S = (IsNum(a) && IsNum(b)) ? "OK" : "NG"; Console.WriteLine(S); Console.ReadLine(); } } }