結果
| 問題 |
No.1005 BOT対策
|
| コンテスト | |
| ユーザー |
双六
|
| 提出日時 | 2020-08-28 08:50:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 494 bytes |
| コンパイル時間 | 455 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-09 01:04:19 |
| 合計ジャッジ時間 | 2,350 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 3 |
ソースコード
# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")
def getlist():
return list(map(int, input().split()))
#処理内容
def main():
S = input()
T = input()
if len(T) == 1:
print(-1)
return
T2 = T[:-1] + "." + T[-1]
# print(T2)
cnt = 0
# for i in range(10):
while S.count(T) >= 1:
S = S.replace(T, T2, 1)
cnt += 1
# print(S)
print(cnt)
if __name__ == '__main__':
main()
双六