結果
問題 |
No.446 ゆきこーだーの雨と雪 (1)
|
ユーザー |
![]() |
提出日時 | 2017-08-12 08:28:06 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 627 bytes |
コンパイル時間 | 933 ms |
コンパイル使用メモリ | 103,328 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 21:33:22 |
合計ジャッジ時間 | 1,495 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 10 WA * 3 |
ソースコード
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 > 0 && 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"); }