結果

問題 No.1909 Detect from Substrings
ユーザー Moss_LocalMoss_Local
提出日時 2022-04-22 21:16:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 766 bytes
コンパイル時間 489 ms
コンパイル使用メモリ 10,816 KB
実行使用メモリ 11,468 KB
最終ジャッジ日時 2023-09-06 07:32:27
合計ジャッジ時間 4,287 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 40 ms
11,152 KB
testcase_02 RE -
testcase_03 AC 41 ms
11,452 KB
testcase_04 AC 40 ms
11,164 KB
testcase_05 AC 42 ms
11,252 KB
testcase_06 AC 41 ms
11,340 KB
testcase_07 AC 42 ms
11,344 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 42 ms
11,336 KB
testcase_11 AC 43 ms
11,196 KB
testcase_12 AC 42 ms
11,344 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 RE -
testcase_22 RE -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
from functools import lru_cache
from sys import flags, stdin
import math
import re
import queue
import typing
import itertools
import bisect
import statistics
# import numpy as np
# from numpy.core.function_base import _needs_add_docstring
# from numpy.core.numeric import outer
input = stdin.readline
MOD = 1000000007
INF = 122337203685477580


def solve():
    n, m = map(int, input().split())
    if n > 2:
        print(0)
        return
    # a = input()
    # b = input()
    # print(a[1:-1])
    # print(b[:-2])
    if a[1:-1] == b[:-2] and b[1:-1] == a[:-2]:
        print(2)
    elif a[1:-1] == b[:-2] or b[1:-1] == a[:-2]:
        print(1)
    else:
        print(0)

    return


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