結果
問題 | No.446 ゆきこーだーの雨と雪 (1) |
ユーザー | ichibanshibori |
提出日時 | 2016-11-18 22:36:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 241 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-26 07:19:25 |
合計ジャッジ時間 | 1,328 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
import re input_pattern = re.compile(r'^([1-9]\d*)$') def check(in_str): if len(in_str) < 1 or len(in_str) > 5: return False if in_str == '0': return True if input_pattern.match(in_str) is None: return False return int(in_str) <= 12345 A = input() B = input() if check(A) and check(B): print('OK') else: print('NG')