結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
14,464 KB
testcase_01 AC 6 ms
13,844 KB
testcase_02 AC 6 ms
13,904 KB
testcase_03 AC 6 ms
13,684 KB
testcase_04 AC 7 ms
13,184 KB
testcase_05 AC 6 ms
14,152 KB
testcase_06 AC 6 ms
12,840 KB
testcase_07 AC 6 ms
13,152 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 6 ms
13,948 KB
testcase_11 AC 7 ms
14,100 KB
testcase_12 WA -
testcase_13 AC 7 ms
13,640 KB
testcase_14 AC 7 ms
13,996 KB
testcase_15 AC 6 ms
13,548 KB
testcase_16 AC 6 ms
13,464 KB
testcase_17 AC 6 ms
13,736 KB
testcase_18 WA -
testcase_19 AC 6 ms
12,800 KB
testcase_20 AC 6 ms
13,156 KB
testcase_21 AC 7 ms
13,600 KB
testcase_22 AC 6 ms
13,180 KB
testcase_23 AC 7 ms
13,828 KB
testcase_24 AC 7 ms
14,128 KB
testcase_25 AC 7 ms
14,300 KB
testcase_26 AC 7 ms
14,060 KB
testcase_27 AC 6 ms
13,128 KB
testcase_28 WA -
testcase_29 AC 7 ms
14,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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