結果
問題 | No.446 ゆきこーだーの雨と雪 (1) |
ユーザー | mencotton |
提出日時 | 2017-12-30 17:10:55 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 902 bytes |
コンパイル時間 | 2,063 ms |
コンパイル使用メモリ | 102,048 KB |
実行使用メモリ | 24,876 KB |
最終ジャッジ日時 | 2023-08-23 11:05:04 |
合計ジャッジ時間 | 3,804 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 55 ms
20,692 KB |
testcase_01 | AC | 50 ms
20,432 KB |
testcase_02 | AC | 50 ms
20,460 KB |
testcase_03 | AC | 55 ms
18,844 KB |
testcase_04 | AC | 55 ms
22,792 KB |
testcase_05 | AC | 56 ms
22,744 KB |
testcase_06 | AC | 54 ms
20,848 KB |
testcase_07 | AC | 50 ms
22,528 KB |
testcase_08 | AC | 55 ms
22,860 KB |
testcase_09 | AC | 50 ms
22,456 KB |
testcase_10 | AC | 54 ms
20,720 KB |
testcase_11 | AC | 50 ms
20,544 KB |
testcase_12 | AC | 55 ms
22,840 KB |
testcase_13 | AC | 55 ms
22,808 KB |
testcase_14 | AC | 54 ms
20,868 KB |
testcase_15 | AC | 55 ms
24,876 KB |
testcase_16 | AC | 55 ms
20,804 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; namespace Test { class Program { static void Main(string[] args) { string s1 = Console.ReadLine(); string s2 = Console.ReadLine(); bool flag = !((s1[0] == '0' && s1.Length != 1) || (s2[0] == '0' && s2.Length != 1)); for (int i = 0; i < s1.Length; i++) { if (s1[i] < '0' || '9' < s1[i]) flag = false; } if (flag) { if (int.Parse(s1) > 12345) flag = false; } for (int i = 0; i < s2.Length; i++) { if (s2[i] < '0' || '9' < s2[i]) flag = false; } if (flag) { if (int.Parse(s2) > 12345) flag = false; } Console.WriteLine(flag ? "OK" : "NG"); } } }