結果
| 問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
| コンテスト | |
| ユーザー |
14番
|
| 提出日時 | 2016-11-18 22:33:21 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 1,315 bytes |
| コンパイル時間 | 3,054 ms |
| コンパイル使用メモリ | 111,724 KB |
| 実行使用メモリ | 26,444 KB |
| 最終ジャッジ日時 | 2024-11-26 07:15:32 |
| 合計ジャッジ時間 | 4,027 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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.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();
}
}
14番