結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
![]() |
提出日時 | 2017-08-12 08:28:51 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 627 bytes |
コンパイル時間 | 742 ms |
コンパイル使用メモリ | 103,156 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-12 21:33:24 |
合計ジャッジ時間 | 1,435 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 11 WA * 2 |
ソースコード
import std.algorithm; import std.array; import std.ascii; import std.conv; import std.math; import std.stdio; import std.string; import std.range; int readint() { return readln.chomp.to!int; } int[] readints() { return readln.split.map!(to!int).array; } bool calc(string a, string b) { bool validate(string s) { if (!s.all!isDigit) return false; if (s.length > 1 && s[0] == '0') return false; return true; } return validate(a) && validate(b); } void main() { auto s = readln.chomp; auto t = readln.chomp; writeln(calc(s, t) ? "OK" : "NG"); }