14800 - Substring Counter (Longer substring)   

Description

輸入一個字串 str 與一個目標子字串 sub,請找出該子字串在字串中出現的所有位置(大小寫不分)。

若有出現,輸出位置及總次數:

Found X times at positions: P1, P2, ..., PX

若沒有出現,輸出:

Not Found

 

Input

1.第一行:字串 str(長度 ≤ 50)

2.第二行:子字串 sub(長度 ≤ 50)

 

Note:

1.str 與 sub 可包含大小寫英文字母。

2.字串長度不超過 50 個字元(最多 50 個字元)。

 

Output

如果有找到,輸出:

Found X times at positions: P1, P2, ..., PX

若沒找到則輸出:

Not Found

 

Note:

1.輸出的最後必須要有一個換行符號 (\n)。

2.P1, P2, ... 為子字串 sub(不分大小寫)出現的起始位置。

 

Sample Input  Download

Sample Output  Download

Tags




Discuss