結果
問題 | No.1005 BOT対策 |
ユーザー |
|
提出日時 | 2021-06-28 19:27:55 |
言語 | Swift (6.0.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 297 bytes |
コンパイル時間 | 6,375 ms |
コンパイル使用メモリ | 173,460 KB |
実行使用メモリ | 17,152 KB |
最終ジャッジ日時 | 2024-06-25 14:05:18 |
合計ジャッジ時間 | 7,505 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 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) }