結果

問題 No.1005 BOT対策
ユーザー MaboyMaboy
提出日時 2021-06-28 19:27:55
言語 Swift
(5.10.0)
結果
WA  
実行時間 -
コード長 297 bytes
コンパイル時間 7,288 ms
コンパイル使用メモリ 153,480 KB
実行使用メモリ 14,624 KB
最終ジャッジ日時 2023-09-07 20:20:02
合計ジャッジ時間 7,970 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
14,372 KB
testcase_01 AC 6 ms
14,044 KB
testcase_02 AC 6 ms
14,024 KB
testcase_03 AC 7 ms
13,784 KB
testcase_04 AC 7 ms
13,904 KB
testcase_05 AC 7 ms
14,560 KB
testcase_06 AC 6 ms
13,840 KB
testcase_07 AC 6 ms
13,796 KB
testcase_08 AC 6 ms
14,288 KB
testcase_09 AC 6 ms
14,216 KB
testcase_10 AC 6 ms
13,908 KB
testcase_11 AC 7 ms
14,068 KB
testcase_12 WA -
testcase_13 AC 6 ms
13,432 KB
testcase_14 AC 7 ms
14,564 KB
testcase_15 AC 7 ms
13,460 KB
testcase_16 AC 6 ms
13,624 KB
testcase_17 AC 6 ms
13,636 KB
testcase_18 AC 6 ms
14,492 KB
testcase_19 AC 6 ms
13,828 KB
testcase_20 AC 6 ms
13,788 KB
testcase_21 AC 6 ms
13,508 KB
testcase_22 AC 6 ms
13,504 KB
testcase_23 AC 5 ms
13,456 KB
testcase_24 AC 7 ms
14,036 KB
testcase_25 AC 7 ms
13,892 KB
testcase_26 AC 7 ms
14,060 KB
testcase_27 AC 5 ms
13,912 KB
testcase_28 WA -
testcase_29 AC 7 ms
14,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
}
0