結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-28 19:27:55 |
| 言語 | Swift (6.2.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 297 bytes |
| 記録 | |
| コンパイル時間 | 1,383 ms |
| コンパイル使用メモリ | 217,776 KB |
| 実行使用メモリ | 19,712 KB |
| 最終ジャッジ日時 | 2026-07-29 21:39:09 |
| 合計ジャッジ時間 | 3,210 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_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)
}