結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-28 19:27:55 |
| 言語 | Swift (6.2.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 297 bytes |
| 記録 | |
| コンパイル時間 | 8,322 ms |
| コンパイル使用メモリ | 211,548 KB |
| 実行使用メモリ | 19,456 KB |
| 最終ジャッジ日時 | 2026-03-11 22:38:25 |
| 合計ジャッジ時間 | 4,679 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 2 |
ソースコード
import Foundation
var s = String(readLine()!)
let t = String(readLine()!)
var c = 0
if t.count == 1 && s.contains(t){
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)
}