結果
| 問題 | No.430 文字列検索 |
| コンテスト | |
| ユーザー |
ebicochineal
|
| 提出日時 | 2016-10-22 00:50:48 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 806 ms / 2,000 ms |
| コード長 | 346 bytes |
| 記録 | |
| コンパイル時間 | 781 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,488 KB |
| 最終ジャッジ日時 | 2026-05-09 08:59:33 |
| 合計ジャッジ時間 | 9,210 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 14 |
ソースコード
#! /usr/bin/env python3
def f(s, t):
p = 0
cnt = 0
while 1:
p = s.find(t)
if p >= 0:
cnt += 1
s = s[p+1:]
else:
break
return cnt
def main():
s = input()
n = int(input())
print(sum(f(s, input()) for _ in range(n)))
if __name__ == '__main__':
main()
ebicochineal