結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー 👑 yumechiyumechi
提出日時 2016-11-19 00:05:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 534 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 86,836 KB
実行使用メモリ 79,780 KB
最終ジャッジ日時 2023-08-17 12:29:38
合計ジャッジ時間 3,786 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
79,704 KB
testcase_01 AC 148 ms
79,624 KB
testcase_02 AC 149 ms
79,780 KB
testcase_03 AC 147 ms
79,640 KB
testcase_04 AC 146 ms
79,732 KB
testcase_05 AC 148 ms
79,688 KB
testcase_06 AC 148 ms
79,492 KB
testcase_07 AC 149 ms
79,684 KB
testcase_08 AC 149 ms
79,684 KB
testcase_09 AC 145 ms
79,688 KB
testcase_10 AC 146 ms
79,728 KB
testcase_11 AC 154 ms
79,644 KB
testcase_12 AC 147 ms
79,692 KB
testcase_13 AC 148 ms
79,656 KB
testcase_14 AC 147 ms
79,624 KB
testcase_15 AC 150 ms
79,724 KB
testcase_16 AC 150 ms
79,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import re

def shapingNumber(number: str) -> str:
    shaping = number
    shaping = re.sub("^0+.+", "", shaping)
    shaping = re.sub("[^0-9]", "", shaping)
    return shaping

def isEqualShapingNumber(original: str) -> bool:
    return original == shapingNumber(original)

def solve():
    a, b = input(), input()
    ans = False
    if isEqualShapingNumber(a) and isEqualShapingNumber(b):
        if int(a) <= 12345 and int(b) <= 12345:
            ans = True
    print("OK" if ans else "NG")

if __name__=="__main__":
    solve()
0