結果
問題 | No.446 ゆきこーだーの雨と雪 (1) |
ユーザー |
![]() |
提出日時 | 2018-08-27 09:14:13 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 2,000 ms |
コード長 | 742 bytes |
コンパイル時間 | 859 ms |
コンパイル使用メモリ | 111,352 KB |
実行使用メモリ | 26,756 KB |
最終ジャッジ日時 | 2024-07-01 04:06:04 |
合計ジャッジ時間 | 1,905 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
コンパイルメッセージ
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();}}}