結果
| 問題 | No.1909 Detect from Substrings | 
| コンテスト | |
| ユーザー |  gew1fw | 
| 提出日時 | 2025-06-12 14:47:08 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 197 bytes | 
| コンパイル時間 | 182 ms | 
| コンパイル使用メモリ | 82,772 KB | 
| 実行使用メモリ | 61,824 KB | 
| 最終ジャッジ日時 | 2025-06-12 14:49:30 | 
| 合計ジャッジ時間 | 3,847 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 WA * 26 | 
ソースコード
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)
            
            
            
        