結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
|
提出日時 | 2020-07-30 05:31:00 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 756 bytes |
コンパイル時間 | 878 ms |
コンパイル使用メモリ | 108,136 KB |
実行使用メモリ | 25,920 KB |
最終ジャッジ日時 | 2024-07-02 05:20:37 |
合計ジャッジ時間 | 2,107 ms |
ジャッジサーバーID (参考情報) |
judge2 / 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; namespace _0446 { class Program { static void Main(string[] args) { var a = Console.ReadLine(); var b = Console.ReadLine(); var f = true; var x = 0; var y = 0; if(int.TryParse(a,out x) && int.TryParse(b,out y)){ if((x >= 0 && x <= 12345) && (y >= 0 && y <= 12345)){ var s = a.Length >= 2 && a[0] == '0'; var t = b.Length >= 2 && b[0] == '0'; f = s || t ? false : true; }else{ f = false; } }else{ f = false; } Console.WriteLine(f ? "OK" : "NG"); } } }