結果

問題 No.1909 Detect from Substrings
ユーザー gew1fw
提出日時 2025-06-12 19:56:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 197 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 82,032 KB
実行使用メモリ 61,808 KB
最終ジャッジ日時 2025-06-12 19:57:27
合計ジャッジ時間 3,157 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
if n != 2:
    print(0)
else:
    s1 = input().strip()
    s2 = input().strip()
    case1 = s1[1:] == s2[:-1]
    case2 = s2[1:] == s1[:-1]
    print(case1 + case2)
0