A - Similar String Editorial by cirno3153
0
をo
に、1
をl
に置き換えると、 \(S\) と \(T\) が同じ文字列か判定する問題になります。
fun main() {
val N = readLine()!!
val S = readLine()!!.replace("0", "o").replace("1", "l")
val T = readLine()!!.replace("0", "o").replace("1", "l")
println(if (S == T) "Yes" else "No")
}
posted:
last update: