結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-28 19:25:55 |
| 言語 | Swift (6.2.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 |
ソースコード
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)
}