結果

問題 No.1005 BOT対策
ユーザー Maboy
提出日時 2021-06-28 19:25:55
言語 Swift
(6.0.3)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 11,863 ms
コンパイル使用メモリ 172,124 KB
実行使用メモリ 17,024 KB
最終ジャッジ日時 2024-06-25 14:03:14
合計ジャッジ時間 7,417 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import Foundation
var s = String(readLine()!)
let t = String(readLine()!)
var c = 0
if t.count == 1{
    print(-1)
}else{
    let i = t.startIndex
    let p = t[...i] + "." + t[t.index(after: i)...]
    let q = s.replacingOccurrences(of: t, with: p)
    print(q.count - s.count)
}
0