結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー 👑 yumechiyumechi
提出日時 2016-11-19 00:02:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 435 bytes
コンパイル時間 2,146 ms
コンパイル使用メモリ 86,492 KB
実行使用メモリ 80,028 KB
最終ジャッジ日時 2023-08-17 12:29:05
合計ジャッジ時間 4,050 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
79,756 KB
testcase_01 AC 146 ms
79,672 KB
testcase_02 AC 147 ms
79,848 KB
testcase_03 AC 147 ms
79,780 KB
testcase_04 AC 145 ms
79,860 KB
testcase_05 AC 146 ms
79,752 KB
testcase_06 WA -
testcase_07 AC 149 ms
80,028 KB
testcase_08 WA -
testcase_09 AC 149 ms
79,860 KB
testcase_10 AC 148 ms
79,844 KB
testcase_11 AC 151 ms
79,776 KB
testcase_12 AC 148 ms
79,800 KB
testcase_13 AC 147 ms
80,028 KB
testcase_14 AC 148 ms
79,840 KB
testcase_15 AC 148 ms
79,832 KB
testcase_16 AC 146 ms
79,588 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()
    print("OK" if isEqualShapingNumber(a) and isEqualShapingNumber(b) else "NG")

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