## 提交連結 <!-- 在批改系統上作答的同學請填寫提交連結,若無則請留空。 --> https://judge.ccclub.io/contest/83/problem/01 ## 程式碼 <!-- 請填入你的程式碼並注意縮排。 請勿上傳螢幕截圖! --> ```python #輸入關鍵字及文章內容 keyword=input().split() keywords=keyword.copy() content="" while True: text_here=input() if text_here=='end': content=content[:-1] break else: content=content+text_here+"\n" # 處理關鍵字 eg. apple, app,請以長度較長的關鍵字為先 # 用i和j兩個一樣內容的迴圈進行判斷,是為了做兩兩相比 for i in keyword: for j in keywords: if i in j and (len(i))<(len(j)): keyword.remove(i) # 若有相同且字串長度比較小的,就把它從關鍵字中移除 #看每個關鍵字是否有在文章中,如果有,用replace加上引號 for i in keyword: if i in content: content=content.replace(i,"「"+i+"」") print(content) ``` ## 錯誤訊息 <!-- 若有錯誤訊息請提供截圖,若無則請留空。 --> Runtime Error ## 問題描述 <!-- 請盡量完整地敘述你的問題。 --> 測資在Jupyter上都對,不確定問題在哪?
提交連結
https://judge.ccclub.io/contest/83/problem/01
程式碼
錯誤訊息
Runtime Error
問題描述
測資在Jupyter上都對,不確定問題在哪?